The counter is printing, but it's always zero. Why isn't it incrementing properly?our $ctr = 0; say "processing duplicates..."; LOOP: foreach my $pid (@duplicated) { $pm->start and next LOOP; # do the fork unless ($ctr % 1000) {say $ctr;} $ctr++; #do stuff $pm->finish; # exit the child process }
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |