in reply to Re: How to tell if a pipe opened for reading has data to be read
in thread How to tell if a pipe opened for reading has data to be read

Hm. Why does setting select's timeout to 0 not work? It should work, at least in POSIX-compatible implementations.
  • Comment on Re^2: How to tell if a pipe opened for reading has data to be read

Replies are listed 'Best First'.
Re^3: How to tell if a pipe opened for reading has data to be read
by saintly (Scribe) on Mar 30, 2007 at 22:32 UTC
    I was hoping that Perl would turn an 'undef' for $timeout into a NULL pointer and '0' for $timeout into a struct timeval with a 0 value, but I hadn't tested it. One of the comments in the earlier thread Re: Re: Non blocking read on a filehandle indicated it wasn't working then (back in 2001).