in reply to backticks stop working

If you want to time out reading the output of an external command, then you really need to use     open(PIPE,"$command |")... and not backticks.

Besides the problem you have already noticed, signals in Perl still aren't reliable and so have about a 2% chance of breaking Perl each time you use a Perl signal handler. So it doesn't take very many invocations of signal handlers before you have a pretty good chance of your script behaving unpredictably.

A better solution would be to use select on a PIPE that was opened.

        - tye (but my friends call me "Tye")

Replies are listed 'Best First'.
Re: (tye)Re: backticks stop working
by dlee (Initiate) on Nov 09, 2001 at 20:30 UTC
    I changed the backticks to 'open' and all seem to be fine. thanks much.