That's expected behavior---finish() is not supposed to return. But why would you want to pass in a code reference as a return code? None of the example code I've looked at does that.
In any case I what you need to do is call finish() within the loop:
while (<LIST>){ $manager->start and next; my @array = split( /\s+/, $_ ); # do child stuff $manager->finish; }
In reply to Re: Strange (for me) behavior of Parallel::ForkManager
by mbethke
in thread Strange (for me) behavior of Parallel::ForkManager
by Sterh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |