Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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

by Thelonius (Priest)
on May 14, 2009 at 20:07 UTC ( #764155=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

I think you're confusing ARGV with standard input, but it's not clear. If you want (in bash), the output of one program to be the arguments of another, you can use the backticks `` or $( ).

If you fix your programs by changing $arg shift @ARGV to $arg = shift @ARGV, then you can get the effect that I think you want by doing (in bash):

./two.pl $(./one.pl "one")
  • Comment on Re: How do I use the output of one perls script as the input of another on the commandline? like a pipeline
  • Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://764155]
help
Chatterbox?
[mz2255]: Yes, just edited the scratchpad. Not sure if I'm doing something wrong, it's my first time.
[ambrus]: No, you're not doing anything wrong. It's just that our automatic spam filters confuse you with the spammers who post advertisments for online shops of counterfeit branded clothing.
[ambrus]: Or unless you left the title field empty or entered a very short title for the node, but then you'd get a message saying that.
[ambrus]: I hope Corion or some other admin is here and can check the logs to see what the problem is.
[mz2255]: I wish I had an online shop but sadly no. The title field definitly wasn't short, had a perl module in the title with 5-6 additional words.

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (12)
As of 2017-10-19 15:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (255 votes). Check out past polls.

    Notices?