Introducing PadWalker
use PadWalker qw(var_name); func_1(); exit; sub func_1 { my $message = 'Hello World!'; func_2($message); } sub func_2 { say var_name(1, \$_[0]); # '$message' }
use PadWalker qw(var_name); func_1(); exit; sub func_1 { my $message = 'Hello World!'; func_2($message); } sub func_2 { say var_name(1, \$_[0]); # '$message' }