in reply to redirect STDERR to my log file, also funny *FOO notation.
Another way to do what you want is to localize STDERR in the scope where you want logging. The trick there is to organize your code so that where you want logging coincides with a scope.
{ open local(*STDERR), '>> /var/log/mylog.log' or die 'Gah! ', $!; # or die 'Gah! ', $/; # Oops, typo # do stuff }
Update: Localizing STDERR does two things.
After Compline,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: redirect STDERR to my log file, also funny *FOO notation.
by JohnMG (Beadle) on Nov 15, 2005 at 15:42 UTC |