in reply to While loop not exiting when expected.
I can't see the problem presently, but this does seem like a pretty ideal solution for Parallel::ForkManager
use Parallel::ForkManager; open my $fh, '<', 'foo.csv' or die "ack: $!"; my $pm = Parallel::ForkManager->new( MAX_KIDS ); while(<$fh>) { my $pid = $pm->start and next; { your_sub( split ',' ); } $pm->end; }
HTH
_________
broquaint
update: s/Parra/Para/g, thanks to liz and Albannach for picking up on that one
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: While loop not exiting when expected.
by BazB (Priest) on Jun 25, 2004 at 10:22 UTC |
In Section
Seekers of Perl Wisdom