If you run your first code through B::Deparse I don't think it's being parsed the way you think it is. But rather than playing games attempting to get something other than a bareword or block working in the filehandle slot, why not just use something along the lines of: open( my $stderr, ">&STDERR" ) or die "Can't dup STDERR: $!\n";?
The cake is a lie.
The cake is a lie.
The cake is a lie.
In reply to Re: sub STDERR { *STDERR } -- nearly works !
by Fletch
in thread sub STDERR { *STDERR } -- nearly works !
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |