If you expect interleaved output, you will need to disable output buffering and make your code much slower:
sub alpha { foreach my $i (900 .. 1900) { print 'A',"\t"; sleep rand(2); } } sub numeric { foreach my $j (1 .. 1000) { print $j,"\t"; sleep rand(2); } } # Make print() output unbuffered; $| = 1; LINKS: foreach my $linkarray (@links) { $pm->start and next LINKS; # do the fork ...
In reply to Re^3: Odd behaviour of Parallel::ForkManager
by Corion
in thread Odd behaviour of Parallel::ForkManager
by ravi45722
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |