perl script invoking a chain of other perl scripts ....

Discussion in 'Perl Misc' started by martin, Apr 17, 2006.

  1. martin

    martin Guest

    Hi , this question deals with a perl script that calls other perl
    scripts using 'exec' or 'system' call.
    I think it is a mute point and of no concern but I decided to ask just
    to be sure.
    Bascially I have something like this :

    Calling script file --->
    #!/usr/bin/perl
    .....
    .....
    .....
    my $cdpat2 = 'C:\Program Files';
    my $cdpat1 = 'C:\DIR1
    my $cdpat3 = 'C:\DIR2\STUFF\bin';

    exec ("CalledScript1.pl $cdpath1 $cdpath2 $cdpath3");
    exec ("CalledScript2.pl $cdpath1 $cdpath2 $cdpath3");

    The question I have is that, do I need to worry about the completion of
    the first script, i.e. Called Scriopts1.pl before I involve the
    CalledScript2.pl. I don't think this should be of a concern, but I
    thought to ask since the first call could take a long while to process
    and the second one relies on the completion of the first one. Thanks.
    Martin
     
    martin, Apr 17, 2006
    #1
    1. Advertising

  2. martin wrote:
    [...]
    > Bascially I have something like this :
    >

    [...]
    > exec ("CalledScript1.pl $cdpath1 $cdpath2 $cdpath3");
    > exec ("CalledScript2.pl $cdpath1 $cdpath2 $cdpath3");
    >
    > The question I have is that, do I need to worry about the completion
    > of the first script, i.e. Called Scriopts1.pl before I involve the
    > CalledScript2.pl. [...]


    No, you don't need to be concerned because the script will never reach the
    second exec() anyway.
    The only exception would be if the first exec call fails to start.

    For further details please see "perldoc -f exec".

    jue
     
    Jürgen Exner, Apr 17, 2006
    #2
    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. Rajat
    Replies:
    3
    Views:
    730
    Jorgen Grahn
    Jan 8, 2010
  2. VYAS ASHISH M-NTB837
    Replies:
    2
    Views:
    588
    Jan Kaliszewski
    Jan 7, 2010
  3. Haresh
    Replies:
    0
    Views:
    186
    Haresh
    Oct 10, 2003
  4. vabby
    Replies:
    10
    Views:
    240
    Joe Smith
    Mar 13, 2007
  5. Replies:
    13
    Views:
    563
    Anno Siegel
    Sep 10, 2007
Loading...

Share This Page