calling External Perl Script Who calls another

A

Ashish

Hi,
I have three perl Scripts A,B and C, Scripts B and C offer Option/s to
execute them,
the execution is such a way the A calls B and B calls C,
with open2 I can offer required option to B to get executed,
my question is how do I pass option so that C gets Executed
 
I

Ian Stuart

Ashish said:
Hi,
I have three perl Scripts A,B and C, Scripts B and C offer Option/s to
execute them,
the execution is such a way the A calls B and B calls C,
with open2 I can offer required option to B to get executed,
my question is how do I pass option so that C gets Executed
What determines if C is called? Is it defined by A or B?

If it's defined by A, then A needs to pass into B some flag that B can
then use to determine if C is to be called..
 
A

Ashish

Ian Stuart said:
What determines if C is called? Is it defined by A or B?

If it's defined by A, then A needs to pass into B some flag that B can
then use to determine if C is to be called..

I missed a crucial information , that I am on win32, so probably expact
module won't help.
further, B and C scripts are not maitained by me, they are copied from a
server to local machine and executed locally,
I thought of modifying them but they keep changing
 
J

Jürgen Exner

Ashish said:
Hi,
I have three perl Scripts A,B and C, Scripts B and C offer Option/s
to execute them,
the execution is such a way the A calls B and B calls C,
with open2 I can offer required option to B to get executed,
my question is how do I pass option so that C gets Executed

I'm not sure if I understand your problem.
For system() as well as for backticks or exec() you can pass as many
parameters to the new script as you like.

jue
 
E

Eric Bohlman

I have three perl Scripts A,B and C, Scripts B and C offer Option/s to
execute them,
the execution is such a way the A calls B and B calls C,
with open2 I can offer required option to B to get executed,
my question is how do I pass option so that C gets Executed

This really looks like an "XY" problem (you're trying to accomplish task X
and you think you ought to be doing it using implementation Y, so you're
asking about how to do Y when it would be more productive to describe X and
be open to using a different implementation than Y). Your particular Y is
impossible to achieve if you don't have control (as you've said you don't)
over scripts B and C; if C is called only from B, then only B can decide
what arguments to pass to it. If you had control over C, you could arrange
for it to look for arguments somewhere other than the command line (e.g. in
an environment variable set by A).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top