in reply to Re^2: Timing out backquoted executions
in thread Timing out backquoted executions

You're probably better off using piped open (see perlopentut) in this case, since that will give you the process id of the spawned process:
# set up alarm... my $pid; $SIG{ALRM} = sub { kill $pid; die "Timed out" }; alarm(5); $pid = open PROG,"/some program|" or die "Can't fork: $!"; my $input = join('',<PROG>); alarm(0); close PROG;
Note; code is untested.

update: added alarm() calls.