if (!$fhandle->fdopen(*STDERR, "a"))
I'm not really sure if it can be used like that... the documentation says:
$io->fdopen ( FD, MODE )
"fdopen" is like an ordinary "open" except that its first p
+arameter is not a filename but rather a file han-
dle name, an IO::Handle object, or a file descriptor number
I don't know if a typeglob is acceptable there. OTOH if it were not one would expect the call to fail... isn't it that *STDERR is being considered numeric and equal to 0 there?
$ perl -le 'print 0+*STDERR'
Mind you, I'm just wild-guessing... in doubt try with fileno STDERR (==2 if you haven't changed it!)