in reply to Re (tilly) 1: Wierd filehandle call
in thread Wierd filehandle call
I have to discourage *STDERR= *LOGFILE. Sure, it looks nice, but it doesn't change the underlying stderr (fd 2) so that some parts of Perl (I assume) will still use the old handle as will external programs lauched by the script (or has magic to handle this been added?).
It also leaves you in a strange situation. How do you properly close things now? To get that correct requires way too many implementation details about Perl for my taste (it may not even be possible to do it 100% correctly -- I haven't investigate the implementation details as I don't really want to know them).
So I agree with the rest of your code but please use open to dup to STDERR instead.
Then there is the edge case of someone using $STDERR and $LOGFILE and getting very confused. (:
- tye (but my friends call me "Tye")
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (tilly) 3: Wierd filehandle call
by tilly (Archbishop) on Apr 04, 2001 at 22:34 UTC | |
by tye (Sage) on Apr 04, 2001 at 22:43 UTC |