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.
In reply to Re^3: Need help with Piping
by mscharrer
in thread Need help with Piping
by moroshko
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |