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

M

martin

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
 
J

Jürgen Exner

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
 

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

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top