in reply to Re^2: Testing whether a file handle is attached to STDOUT
in thread Testing whether a file handle is attached to STDOUT

Yes, the file numbers for STDIN / STDOUT and STDERR behave the same also on Windows. unistd.h defines them to be 0, 1 and 2 respectively.

Beware though that if you close one of the three, the file numbers may be reallocated to other filehandles.

  • Comment on Re^3: Testing whether a file handle is attached to STDOUT