sub outer { my $var; local $SIG{INT} = sub { ... ...[ Read from and/or write to $var ]... ... }; ... }