After perl program B has run its course then the perl program A is activated once again.
Then you are using the wrong call. With exec, the calling program will never be reactivated as the program that is exec'd replaces the current process completely.
To run another program from within a script and have the first script wait and regain control when the called program terminates, you should use system (or backticks or qx//).
If you are going to use the start command to start the second process (via system), then you will also need to add the /wait switch. Eg.
...
system q[ start /wait /low perl.exe otherscript.pl];
## You'll only get here one otherscript.pl finishes.
...
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
|