in reply to Have script send email if it dies
eval { # do something that might go wrong $a = 1; $b = 0; print $a/$b; }; if ($@} { print "Something went wrong: $@\n"; } [download]