My suggestion: print the value of fileno(STDOUT) just prior to the open.
The OS error message: "Bad file descriptor"; suggests that STDOUT has been closed prior to the flow arriving at that open statement; and you can't dup a closed file handle.
If you get nothing (undef) rather than 2, then you'll need to step back and work out where the filehandle is being closed.
In reply to Re: Bad file descriptor error in Win32 VC2015 compiled perl-5.20.3
by BrowserUk
in thread Bad file descriptor error in Win32 VC2015 compiled perl-5.20.3
by shadowsong
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |