Name
sysread
Synopsis
sysread filehandle, scalar, length, [offset]
Reads length
bytes of
data into variable scalar
from the
specified filehandle
. The function
returns the number of bytes actually read, or 0
at end-of-file. It returns the
undefined value on error. scalar
will
grow or shrink to the length actually read. The
offset
, if specified, says where in the
string to start putting the bytes so you can read into the middle
of a string that’s being used as a buffer. You should be prepared
to handle the problems (such as interrupted system calls) that
standard I/O normally handles for you.
Get Perl in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.