On this Configuration Windows 2000 w/sp4
This is perl, v5.8.4 built for MSWin32-x86-multi-thread
I got these results
C:\Temp>test1.pl (original code)
Name "main::SAVED_STDERR" used only once: possible typo at C:\Temp\Tes
+t1.pl line 7.
testing stdout capture 1
testing stdout capture 2
C:\Temp>test2.pl (ikegami's fix)
fileno(*STDOUT) = 1
fileno(*STDOUT) = 2
fileno(*STDOUT) = -1
fileno(*STDOUT) = -1
testing stdout capture 1
testing stderr capture
testing stdout capture 2
C:\Temp>Test3.pl (ikegami's short version)
testing stdout capture 1
testing stderr capture
testing stdout capture 2
Your sole purpose in life maybe to serve as a warning to others.