Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: How do I use the output of one perls script as the input of another on the commandline? like a pipeline

by sathiya.sw (Monk)
on May 15, 2009 at 07:48 UTC ( [id://764208]=note: print w/replies, xml ) Need Help??


in reply to How do I use the output of one perls script as the input of another on the commandline? like a pipeline

As others suggested, you need to take care of the following two things as
  1. $arg shift @ARGV;
    to
    $arg = shift @ARGV;
  2. You are confused about the stdin, and the command line input.
Another thing which i understand is, you wanted the output to be fed as command line argument instead of input. For that you can use the "xargs" command as
./one.pl "one" | xargs ./two.pl
which will give your expected output. Hope this helps.

Sathiyamoorthy
  • Comment on Re: How do I use the output of one perls script as the input of another on the commandline? like a pipeline
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://764208]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2024-04-23 12:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found