You have to pass in the variable name:
$ perl -MData::Dumper -Mwarnings -Mstrict -le 'my $quxx = 10; my $foo += {bar => 1, bazz => 2}; print Data::Dumper->Dump([$quxx, $foo], [qw( +quxx foo)]);' $quxx = 10; $foo = { 'bar' => 1, 'bazz' => 2 };
In reply to Re: Displaying a variable's name and value in a sub
by trwww
in thread Displaying a variable's name and value in a sub
by Smile-n-Nod
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |