my $string = do { local $/; <FILEHANDLE> };
looks nicer than
my $string; { local $/; $string = <FILEHANDLE> }
but takes twice as much memory. That's probably not that wise when dealing with entire files.
In reply to Re^3: How can you sysread an entire file?
by ikegami
in thread How can you sysread an entire file?
by NeilF
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |