Perl Monk, Perl Meditation | |
PerlMonks |
Re^2: Perl wait vs Unix ksh wait (spawn)by tye (Sage) |
on Oct 31, 2007 at 18:22 UTC ( [id://648320]=note: print w/replies, xml ) | Need Help?? |
Okay, a close approximation to system(1,...) for less fortunate builds of Perl is:
But note that system(1,...) has some non-trivial advantages still; I didn't replicate the "pipe to child process for making 'exec fails' cases" saner. So you can use spawn($cmd) in place of system(1,$cmd) in the code I provided in the previous node. I didn't write spawn() to handle Win32 because it was a quick hack. - tye
In Section
Seekers of Perl Wisdom
|
|