#!/usr/bin/perl use strict; use warnings; chomp(my $Pipe = ( ! -t \*STDIN ) ? do{local $/; <STDIN>} : q{}); print "This was read from the pipe:\n<$Pipe>\n\n"; print "These are the list of parameters:\n<@ARGV>\n"; __END__