calling External Perl Script Who calls another

Discussion in 'Perl Misc' started by Ashish, Dec 13, 2005.

  1. Ashish

    Ashish Guest

    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
    Ashish, Dec 13, 2005
    #1
    1. Advertising

  2. Ashish

    Ian Stuart Guest

    Ashish wrote:
    > 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..
    Ian Stuart, Dec 13, 2005
    #2
    1. Advertising

  3. Ashish

    Ashish Guest

    "Ian Stuart" <> wrote in message
    news:dnmg44$n22$...
    > Ashish wrote:
    >> 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..


    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
    Ashish, Dec 13, 2005
    #3
  4. Ashish wrote:
    > 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
    Jürgen Exner, Dec 13, 2005
    #4
  5. Ashish

    Eric Bohlman Guest

    "Ashish" <> wrote in news:Fdznf.16562$Nb2.293684
    @news1.nokia.com:

    > 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).
    Eric Bohlman, Dec 14, 2005
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chuck
    Replies:
    2
    Views:
    725
    Chuck
    Nov 12, 2004
  2. pj
    Replies:
    3
    Views:
    274
  3. kath
    Replies:
    4
    Views:
    539
    J. Gleixner
    Apr 9, 2007
  4. Pervez Mulla

    Calling External (Perl)Script in Python

    Pervez Mulla, Aug 27, 2012, in forum: Python
    Replies:
    1
    Views:
    202
    Dennis Lee Bieber
    Aug 27, 2012
  5. Yogi
    Replies:
    1
    Views:
    420
    Peter Makholm
    Sep 13, 2012
Loading...

Share This Page