$SIG{INT}=\&myhand; print "Parent pid = $$ \n"; $pid = open(CMD, "ping google.com -n 15 |"); print "Ping running... pid = $pid \n\n"; # replaces print ; vec( my $rin, fileno(*CMD), 1) = 1; while (select (my $rd = $rin, undef, undef, undef)) { my $bytes = sysread *CMD, my $buf, 4096; print $buf if 0 < $bytes; } print "I am finished with my task. My results are: \n"; # where are my results stored if I want them in a variable? # print $results; # wait added to lay the zombies sub myhand() { print "Parent $$ caught SIGINT.\n"; print "Parent $$ will KILL $pid.\n"; kill 9, $pid; waitpid $pid, 0; exit 0; }