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

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

Thread Previous
Jeff 'japhy' Pinyan
November 18, 2003 22:33
Re: [perl #24519] Piped opening from command line?
Message ID:
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
RPI Acacia brother #734
<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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About