Or how about a DIE signal handler?
#!/usr/bin/perl $SIG{__DIE__} = sub { open my $h, ">>", "fatal.log"; print $h scalar localtime, ": @_"; close $h; die @_; }; die "ouch $!\n";
In reply to Re: Control Structures
by zentara
in thread Control Structures
by ghenry
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |