Input/Output
Input in Scalar Context
- To read one line at a time from an input stream, enclose the file
handle in < > simbols and assign the result
to a scalar variable
- Given the input
- One line can be read at at time as follows
$line = <FILEHANDLE>; # Yields "Hello\n"
$line = <FILEHANDLE>; # Yields "World\n"
- To read the entire contents of an input, this scalar read can be
placed in a loop