sub f { local $SIG{INT} = sub { die "a" }; {redo} } $\ = "\n"; print $SIG{INT} ? 1 : 0; eval { f(); }; print $SIG{INT} ? 1 : 0;