Quote:
|
Originally Posted by new2ss
1) This there a better way of achieving the same purpose ( ie call another perl script from a perl script)?
|
Yes. Use require().
Quote:
|
Originally Posted by new2ss
2) Notice there is an exit command in my calling script. Will the exit command be executed only after B.pl is completed OR it will be executed immediately B.pl is called?
|
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?