Next | Lightweight Databases | 18 |
read(FH, my($buffer), $length);
The standard I/O library enables reading by records
Data is read a block (4k or 8k) at a time into an internal buffer
read and <...> copy data out of the buffer
$record = <FH>;
print FH $buffer;
Note the opposite of read is not write; it's print
truncate FH, $length; truncate $filename, $length;
Next | Copyright © 2003 M. J. Dominus |