in reply to Re^4: Using Linux Commands in Perl - `Backticks`
in thread Using Linux Commands in Perl - `Backticks`

I've never used select with a timeout, so that's why I wasn't aware of that additional parameter. As you say, there is no reason to use alarm, as select does everything that's needed to read from a program for a limited amount of time.

  • Comment on Re^5: Using Linux Commands in Perl - `Backticks`

Replies are listed 'Best First'.
Re^6: Using Linux Commands in Perl - `Backticks`
by JavaFan (Canon) on Oct 01, 2010 at 13:43 UTC
    I've never used select with a timeout,
    I guess you mean that you've never used select (the select that's a wrapper around the select(2) system call) ;-)? You cannot use 2 or 3 arguments for select - if you use select to know the status of filehandles, you must give it a timeout. It won't compile otherwise.

      I should have said "with a non-zero timeout".