adamquestion has asked for the wisdom of the Perl Monks concerning the following question:
DATELOOP: while ( ($currentdate <= $enddate) && ($item < 5) ) { $item++; pipe *{$item},RETHAND; unless ($pid = fork()) { print "$command\n"; system($command); print RETHAND "Completed $currentdate\n"; exit(); } $currentdate = nextdate($currentdate); } foreach $item2 (@waitlist) { $response = <$item2>; # received from $item print "$response\n"; $item--; } if ($currentdate <= $enddate) {goto DATELOOP;}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: forks for running multiple codes at same time
by Corion (Patriarch) on Feb 09, 2009 at 07:28 UTC | |
|
Re: forks for running multiple codes at same time
by Anonymous Monk on Feb 09, 2009 at 02:25 UTC | |
by salva (Canon) on Feb 09, 2009 at 09:25 UTC | |
|
Re: forks for running multiple codes at same time
by weismat (Friar) on Feb 09, 2009 at 05:45 UTC | |
by Eyck (Priest) on Feb 09, 2009 at 07:37 UTC | |
by weismat (Friar) on Feb 09, 2009 at 07:54 UTC | |
by salva (Canon) on Feb 09, 2009 at 09:32 UTC | |
by BrowserUk (Patriarch) on Feb 09, 2009 at 10:29 UTC | |
|