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
In reply to Re: reading (caching?) large files
by davorg
in thread reading (caching?) large files
by perchance
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |