my $slurp = do { open my $fh, '<', "inputfile"; local $/; <$fh> };
P.S. I really like the second one, thanks. Not for production use, of course. :)
Regards,
Alex.
In reply to Re^2: Common Perl Pitfalls
by dwalin
in thread Common Perl Pitfalls
by Joe_
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |