http://qs321.pair.com?node_id=50550


in reply to Re (tilly) 4: Slurp a file
in thread Slurp a file

For the best of both worlds, use both:

my $contents= do { local($/); join '', <INPUT> };
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")