My favorite way of reading the contents of a filehandle into a scalar is:
sysread FILEHANDLE, my $file_contents, -s FILEHANDLE;In benchmarks I've done this is the fastest and most elegant way that I've found.
In reply to Re: Slurp a file
by dkubb
in thread Slurp a file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |