herby1620 has asked for the wisdom of the Perl Monks concerning the following question:

We use Active State Perl 5.6.1 here. I can't easily change it, so I need to live with it. I'm attempting to do timeouts of a command/external program and the 'cookbook' solution says use 'alarm'. OOOPS 'alarm' isn't in Active State Perl 5.6 (it is in 5.8, but I can't use it). My question:

What is a good way to do a timeout in Win32 Perl 5.6?

This can't be a too difficult thing to do these days (or is it?).

Thanks .

Replies are listed 'Best First'.
Re: Timeouts in Perl 5.6 (under Win32)
by Joost (Canon) on Oct 18, 2006 at 20:20 UTC
Re: Timeouts in Perl 5.6 (under Win32)
by syphilis (Archbishop) on Oct 18, 2006 at 23:47 UTC
    Launch the external program by using the Win32::Process module (which you should already have). You can then make use of that module's Wait() method to time out the external program. (See 'perldoc Win32::Process'.)

    Cheers,
    Rob