my $program = '/bin/ls'; my $num_children = 5; $SIG{CHLD} = 'IGNORE'; for (1..$num_children) { defined ( my $pid = fork ) or die "Can not fork!"; if (!$pid) { # in child process exec $program; } }