use Win32::Process; Win32::Process::Create($processobj, "C:\\foo.exe", "foo -options_here", 0, NORMAL_PRIORITY_CLASS, ".") || die print Win32::FormatMessage( Win32::GetLastError() ); $processobj->Wait(20000); $processobj->GetExitCode($return); #### eval { local $SIG{ALRM} = sub {die "alarm";}; alarm(20); $return = `foo -options_here`; alarm(0); }; if ($@) { if ($@ =~ /alarm/) { print "timeout\n"; } else { die; } }