Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: run perl script with cmd line in shell

by Sandy (Curate)
on Apr 16, 2012 at 12:28 UTC ( #965299=note: print w/replies, xml ) Need Help??


in reply to run perl script with cmd line in shell

I am truly confused as what it is that you are asking.

Are you asking to pass parameters which are outputs from a perl script to another perl script?

Use the unix backticks to execute your perl program on the command line first...

 perl -e 'print "@ARGV\n"' `perl -e '@x=(1..5);print "@x\n"'`

or, pipe the output from one perl script into stdin of 2nd perl script

perl -e '@x=(1..5);print "@x"' | perl -e 'while (<>) {print};print"\n +"'
Like I said, I am unsure if this is what you are asking.

Sandy

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://965299]
help
Chatterbox?
[Discipulus]: ah! holidays i hope..
Discipulus without Corion and with choroba in another timezone the monastery was silent.. I was silbing alone in the cloister
[choroba]: Yes, I feel alone in the cyberspace...
[choroba]: Not many occasions to talk to my wife, either :-(
Discipulus s/silbing/whistle/ dunno from where this word was in my mind..
[Discipulus]: lost in time in space and in the meaning (rocky horror picture show)

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (8)
As of 2017-02-22 08:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (325 votes). Check out past polls.