TITLE ^

IO - Perl 6 IO class

DESCRIPTION ^

This file implements the IO file handle class.

Methods ^

close

Closes the file.

eof

Tests if we have reached the end of the file.

lines

our List multi method lines (IO $handle:) is export;

Returns all the lines of a file as a (lazy) List regardless of context. See also slurp.

print

Writes the given list of items to the file.

printf

Parses a format string and prints formatted output according to it.

readline

Reads a line from the file handle.

say

Writes the given list of items to the file, then a newline character.

slurp

Slurp a file into a string.

Functions ^

prefix:=(IO $io)

Gets the iterator for the IO object.

IOIterator ^

The IOIterator class implements the I/O iterator.

Methods ^

item() (Vtable shift_pmc)

Read a single line and return it.

list()

Read all of the lines and return them as a List.

Coercion methods ^

Scalar

Return the value inside this container in item context.

Private methods ^

!flatten

Return the remainder of the input in flattening context.

Vtable functions ^

POD ERRORS ^

Hey! The above document had some coding errors, which are explained below:

Around line 251:

'=item' outside of any '=over'


parrot