in reply to reading (caching?) large files
If you set $/ to a reference to a (numerical) scalar value then the next time you use <FILE> to read from a filehandle, it will read that number of bytes from the file.
--{ # Always change Perl special vars localised in a block local $/ = \1024; while (<FILE>) { # $_ contains the next 1024 bytes from FILE } }
"Perl makes the fun jobs fun
and the boring jobs bearable" - me
|
|---|