From: Nikola Janceski <[EMAIL PROTECTED]>
> I want to change where the warnings from use warnings goes.
> I already screwed around with STDERR so don't give me those
> suggestions (there are other things going to STDERR). and the same for
> use strict if possible.
>
> =)
>
> thanx if you have any ideas.
I think you could use the $SIG{__WARN__} and $SIG{__DIE__}.
See
perldoc perlvar
Try this script :
BEGIN {
open LOG, '>>warn_and_error.log';
sub logIt {print LOG @_};
$SIG{__WARN__} = \&logIt;
$SIG{__DIE__} = \&logIt;
}
use warnings;
die " $x errrrrrrorrrrrr\n";
HTH, Jenda
=========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==========
There is a reason for living. There must be. I've seen it somewhere.
It's just that in the mess on my table ... and in my brain
I can't find it.
--- me
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]