http://qs321.pair.com?node_id=1224108


in reply to Parallel::ForkManager for any array

Tip #1 from the Basic debugging checklist: use warnings

You will see a warning message

Unquoted string "i" may clash with future reserved word at ...
You should change:
system ("rm", "-fr", $files[i]);
to:
system ("rm", "-fr", $files[$i]);
If you use Tip #6 from the Basic debugging checklist (B::Deparse), you will see how Perl interprets your code:
system 'rm', '-fr', $files[0];