my $child_pid = open $handle, '-|', '/path/to/program' or die "Error starting program $!"; # Some time later the program stops responding kill($child_pid);