Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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?
holli just tried to open a soda bottle with a bottleopener
[holli]: ok, that doesn't *sound* that bad
[Corion]: holli: Was it a "twist-to-open" soda bottle? Or a German Mehrweg bottle with a twisty cap?

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (9)
As of 2017-09-25 12:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (280 votes). Check out past polls.

    Notices?