On Jan 17, 2008 9:54 AM, Jonathan Mast <[EMAIL PROTECTED]> wrote: > I want to write the errors caught by a 'die' clause into a file. snip
Try
#!/usr/bin/perl
use strict;
use warnings;
$SIG{__DIE__} = sub {
open my $fh, ">>", "something.log"
or die @_, "could not open something.log: $!";
print $fh @_;
};
die "Oops";
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
