Have you read the documentation of Parallel::ForkManager? Can you share the code that didn't work?
Update: Copied from the documentation, fruits, sleep, and srand added by me:
#!/usr/bin/perl use warnings; use strict; use Parallel::ForkManager; my $pm = Parallel::ForkManager->new(5); for my $fruit (qw( apple banana cherry lemon lime orange peach pear plum raspberry strawberry )) { my $pid = $pm->start and next; print "Sleeping with $fruit\n"; srand; # To prevent all the children from having the same seed. sleep 3 + rand 8; print "$fruit done.\n"; $pm->finish } $pm->wait_all_children;
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
In reply to Re: Parallel::ForkManager loop in array
by choroba
in thread Parallel::ForkManager loop in array
by steflama
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |