Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: How to get value from one Perl program to another?

by termix (Beadle)
on May 28, 2002 at 18:05 UTC ( #169862=note: print w/replies, xml ) Need Help??

in reply to How to get value from one Perl program to another?

So there are three programs. The first program (let's call this one "master") starts one of the other programs (let's call this one child1) and then gets some values back. These values are then given to the last program (let's call this child2) which does more stuff with them.

If I understand your statement correctly, you want to take the get data from child1 and make it command line parameters for child2. If so you need to check out the 'back-tick' operator (the quote-like thing on the tilda key). Passing stuff as parameter to child2 is easy by either the system command or by opening a pipe.

This is extensively covered in PERL documentation. Look at man perlfunc for the "system" command. Look at man perlop for the "backtick" operator. and look at man perlipc for even niftier ways of making programs talk to each other (with examples even). There is even a man perlopentut which is structured as a tutorial for the "open" command (the part that would help you is called "pipes").

-- termix

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2023-06-07 09:01 GMT
Find Nodes?
    Voting Booth?
    How often do you go to conferences?

    Results (29 votes). Check out past polls.