$pid = open($firsh_child, "-|"); if ($pid) { while (<$first_child>) { $lines .= $_; } } else { foreach (@gets) { $i = 0; $cpid[$i] = fork; unless ($cpid[$i]) { print `perl $_`; exit; } $i++; } exit; }