<read $files [$offset [$length]]>
read function reads each file given in
returns it in the corresponding value of
$ret. If "
(single dash) is given as a file, the standard input is read.
Normally the entire file is read. If an
$offset is given,
reading starts at that offset into the file. Negative offsets apply
from the end of the file. If a
$length is also given, that
many bytes are read; the default is the rest of the file. Negative
lengths indicate the rest of the file. The
$length arguments are parallel to
$files; if they have
fewer values than
$files the last value is re-used.
read returns a list of the contents of each file, from the
indicated offset and length. Empty value(s) indicate an error reading
the file or the file was empty.
read function was added Sep. 17 1996. Support for reading
standard input was added in version 2.6.939400000 19991008.
$length arguments were added in version
If a file is to be immediately printed, the
is more efficient and saves memory.