readread filehandle , $ var , length , [ offset ]
Attempts to read
length
bytes of data into variable
var
from the specified
filehandle
.
The function returns the number
of bytes actually read, or To copy data from the filehandle FROM into the filehandle TO, you could say: Note that the opposite ofwhile (read FROM, $buf, 16384) { print TO $buf; }
read
is simply
print
, which already knows the length of the
string you want to write and can write a string of any length.
Perl's Copyright © 2001 O'Reilly & Associates. All rights reserved. |
|