in reply to Control Structures
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";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Control Structures
by tilly (Archbishop) on Apr 30, 2005 at 00:03 UTC | |
|
Re^2: Control Structures
by ghenry (Vicar) on Apr 29, 2005 at 11:20 UTC |