in reply to Checking if STDIN contains data on win32

-t STDIN
always seem to return 1?!

So, there is no (non-binding) way to check if STDIN contains data on win32? Is there any Win32 API functions that can come to the resuce?
If we wanted to ask for console input and move on if none supplied within x secs, is another situation where checking STDIN would be useful (..and no, alarm doesn't work in this situation on win32).

  • Comment on Re: Checking if STDIN contains data on win32

Replies are listed 'Best First'.
Re^2: Checking if STDIN contains data on win32 (-t)
by tye (Sage) on Oct 26, 2007 at 02:18 UTC
    -t STDIN
    always seem to return 1?!

    Not for me:

    C:\> perl -lwe "printf '<%s>', -t STDIN" <1> C:\> perl -e1 | perl -lwe "printf '<%s>', -t STDIN" <> C:\> perl -lwe "printf '<%s>', -t STDIN" < AUTOEXEC.BAT <>

    - tye