in reply to controling the num of fork sessions

As I understand it altering variables from within sig-handlers can sometimes go wrong since perl's code isn't reenterent. Another way of accomplishing your goal to avoid this possible problem would be to give each child a portion of the list.
Something like this:
my @list = (1..2000); my $kids = 20; my $num_per_kid = int (@list / 20); for my $chld (1..$kids) { my @tmp = @list[(($chld-1)*$num_per_kid)..($chld==$kids ? $#list : $c +hld*$num_per_kid)]; if (fork) { for my $item (@tmp) { print "$_\n"; } } }