For the best of both worlds, use both:
should work quickly for file handles that pay attention to $/ and work about as quickly as possible for those that don't. - tye (but my friends call me "Tye")my $contents= do { local($/); join '', <INPUT> };
In reply to (tye)Re3: Slurp a file
by tye
in thread Slurp a file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |