in reply to Re: Local for lexicals
in thread Local for lexicals

The problem is that the inner my $e is a completely different variable to the outer one, so that functions closing over the outer one don't ‘see’ it. To illustrate:
perl -wMstrict -e 'my $e = 77; my $f = sub { warn $e }; $f->(); { my $ +e = 22; $f->() } $f->();'
gives
77 at -e line 1 77 at -e line 1 77 at -e line 1