in reply to Very basic question on reading error messages
What this does is re-assigns the __WARN__ signal handler (the thing that handles all warnings) to an anonymous sub that outputs the warnings to a file. So now STDERR should be nice and quiet.$SIG{__WARN__} = sub { open(ERR, ">>error.log") or die ("Died because: $!\n"); print ERR @_; close(ERR); };
broquaint
|
|---|