http://www.perlmonks.org?node_id=518941


in reply to alarm on win32

What you want may be Win32::Job's run() method :

Provides a simple way to run the programs with a time limit. The $timeout is in seconds with millisecond accuracy. This call blocks for up to $timeout seconds, or until the processes finish