You've already been given all the fancy ways, but I don't see where anyone has shown you the old-fashioned, primitive way.
foreach ( 1 .. 5 ) { my $pid = fork() // die "fork() failed: $!"; if ( $pid ) { say "parent just spawned child $pid"; } else { exec "DoThis.exe"; } }
Of course you'll need to set up a signal handler to catch the SIGCHLD events if you want to know when they're all done.
- doug
In reply to Re: Parallel Processing
by doug
in thread Parallel Processing
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |