How can I slurp STDIN in Perl?
I can't let this opportunity to say how much I love IO::All
pass without saying:
♥ ♥ __ "I really like IO::All
... a lot" __ ♥ ♥
Variation on the POD SYNOPSIS:
use IO::All;
my $contents < io('-') ;
print "\n printing your IO: \n $contents \n with IO::All goodness ..." ;
Warning: IO::All
may begin replacing everything else you know about IO in perl with its own insidious goodness.
my @lines = <STDIN>;
or
my $str = do { local $/; <STDIN> };