IO - Perl 6 IO class
This file implements the IO file handle class.
- 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.
prefix:=(IO $io)
Gets the iterator for the IO object.
The IOIterator class implements the I/O iterator.
- item() (Vtable shift_pmc)
Read a single line and return it.
- list()
Read all of the lines and return them as a List.
- Scalar
Return the value inside this container in item context.
- !flatten
Return the remainder of the input in flattening context.