in reply to My proudest moment
That would syslog caught exceptions. See $^S.
if (!eval { ...; 1 }) { ... }
That wouldn't catch compile errors (although that's easily fixed using BEGIN).
use strict; $SIG{__DIE__} = sub { syslog("err", shift) }; for my $counter (1..10) { print("$conter\n"); }
|
|---|