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

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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


In reply to Re: How to get value from one Perl program to another? by termix
in thread How to get value from one Perl program to another? by sachinb

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2024-04-19 15:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found