perl -wMstrict -e 'my $e = 77; my $f = sub { warn $e }; $f->(); { my $e = 22; $f->() } $f->();' #### 77 at -e line 1 77 at -e line 1 77 at -e line 1