$SIG{ __DIE__ } = sub { last; }; say "before loop"; { say "start of loop"; die "!"; say "end of loop"; } say "after loop";