But then I'd have to wait until the other script ends, before I can finally end this script. It would effectively keep both in memory at the same time. That doesn't look ideal. | [reply] |
You can do system("perl script2.pl arg1 arg2 &"), which will return immediately. And system("nohup perl scrip2.pl arg1 arg2 &") won't die when the parent process exits.
| [reply] |
No, backtick does not "return the return code." Backtick (the qx// operator) returns the string of any output that the child process sends to STDOUT. The system() call does return the return code.
But he wants to abandon everything else in this script, flush all buffers, close all files, release all resources, and at the last possible moment, to jump to the beginning of a new program instead. The exec() function is just a little heavy-handed since it doesn't do all the cleanup first.
-- [ e d @ h a l l e y . c c ]
| [reply] [d/l] [select] |