perlfunc
gods
<P>
read - fixed-length buffered input from a filehandle
<P>
<HR>
<P>
read
<FONT SIZE=-1>FILEHANDLE,SCALAR,LENGTH,OFFSET</FONT>
<P>
read
<FONT SIZE=-1>FILEHANDLE,SCALAR,LENGTH</FONT>
<P>
<HR>
<P>
Attempts to read
<FONT SIZE=-1>LENGTH</FONT> bytes of data into variable
<FONT SIZE=-1>SCALAR</FONT> from the specified
<FONT SIZE=-1>FILEHANDLE.</FONT> Returns the number of bytes actually read,
<CODE>0</CODE> at end of file, or undef if there was an error.
<FONT SIZE=-1>SCALAR</FONT> will be grown or shrunk to the length actually read. An
<FONT SIZE=-1>OFFSET</FONT> may be specified to place the read data at some other place than the beginning of the string. This call is actually implemented in terms of stdio's
<CODE>fread(3)</CODE> call. To get a true
<CODE>read(2)</CODE> system call, see
[perlfunc:sysread|sysread()].
<HR>