develooper Front page | perl.perl5.porters | Postings from November 2003

Re: [perl #24519] Piped opening from command line?

Thread Previous
From:
Jeff 'japhy' Pinyan
Date:
November 18, 2003 22:33
Subject:
Re: [perl #24519] Piped opening from command line?
Message ID:
Pine.LNX.4.44.0311190131060.22054-100000@perlmonk.org
On Nov 18, Leah said:

>Is there a way to read files given on the commandline which begin or end
>with '|' (pipe) using <>, -p, or -n?  It doesn't seem to be possible.
>It seems strange that perl would trust the user to open arbitrary pipes.

It works for me:

  perl -lne 'print scalar reverse' -- 'date |'

-- 
Jeff "japhy" Pinyan      japhy@pobox.com      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.
[  I'm looking for programming work.  If you like my work, let me know.  ]


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About