my $child_pid = open $handle, '-|', '/path/to/program' or die "Error starting program $!"; # Some time later the program stops responding kill($child_pid); #### my $child_pid = fork(); if( 0 == $child_pid ) { # Child exec '/path/to/program'; die "error starting program $!"; } # Some time later the program stops responding kill($child_pid);