sub mysub { my $error = shift; print STDERR "mail stuff here..\n"; print STDERR "Error message: $error"; print STDERR "End of mail\n"; die $error; } local $SIG{__DIE__} = \&mysub; open(TMPFILE,"<datafile.txt") || die "Cant open: $!";
In reply to Re: die and subroutine combo
by bart
in thread die and subroutine combo
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |