in reply to Re^2: Need help with Piping
in thread Need help with Piping

I like Skeeve's solution. It is the best and clearest way to do this in Perl 5.

For the sake of completeness: In Perl 6 the built-in way for this is simply:

$var = slurp \*STDIN;

This can also be done in Perl 5 by using the Perl6::Slurp module.