Quote:
|
Originally Posted by cbkihong
Yes. Use require().
I think unless your B.pl runs itself in background mode (such as that of daemons, for instance), the perl process for B.pl will not exit before it completes, and hence system() in your calling script will not return (note that system() just executes a perl process in the same way as other processes). If the exit() occurs after system(), you can assume it will only be executed when B.pl exits for whatever reason.
Did you try to find out whether that is the case?
|
B.pl is not a background mode, its a normal user script.
i qoute from perldoc for system "...Does exactly the same thing as exec LIST , except that a fork is done first, and the parent process waits for the child process to complete...." So i can take it that my first script will wait for B.pl to finish before exiting.
the perldoc entry for exec says " ..The exec function executes a system command and never returns--". Therefore i can assume that after it calls B.pl, the calling script will exit.
My intention is not to wait for B.pl to finish, ( ie, runs B.pl and the caller script itself exit ) therefore i should use exec? Any draw backs?