Introducing PadWalker
use PadWalker qw(peek_my); sub my_func { my($var) = @_; my $pad = peek_my(1); my @var_names = keys %$pad; ${$pad->{name}} = 'new value'; }
use PadWalker qw(peek_my); sub my_func { my($var) = @_; my $pad = peek_my(1); my @var_names = keys %$pad; ${$pad->{name}} = 'new value'; }