END { eval { # your END code here 1 } or warn "tried to die in END: $@"; }