in reply to Re^2: Difference b/w my and local var?
in thread Difference b/w my and local var?

Of course if you resort to minor evil there is a way to get at it . . . :)

use PadWalker qw( peek_my ); sub foo { my $ebil = peek_my( 1 ); print $ebil->{'%hash'}->{foo}, "\n"; } { my %hash; local $hash{foo} = 123; foo(); }

(Not that that's germane to the correct point you were making; just an interesting aside your ???s brought up :)

The cake is a lie.
The cake is a lie.
The cake is a lie.