#!/usr/bin/perl use strict; use warnings; my $Pipe= ""; while (<>){ # replaced in Perl 5.22 with "for ( @ARGV )" # Reference: http://www.perlmonks.org/?node_id=1175906 # for ( @ARGV ) { $Pipe .= $_; } print "This was read from the pipe:\n"; print "<$Pipe>\n\n"; print "This was the read from the parameters:\n"; print "<@{ARGV}>\n"; __END__