On 10/29/2017 11:18 PM, ToddAndMargo wrote:
Dear List,


I am trying to translate this P5 coder to P6.
I am looking at how to read a pipe into a line liner:

ReadAPipe.pl
<code>
#!/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__
</code>

That was not a one liner example.  I actually need to know how
to do both.

Reply via email to