As
perlmonkey has noted this problem is due to
$VAR1 being undeclared. A remedy to this is to turn on
$Data::Dumper::Terse which will do away with the
$VAR1 e.g
use Data::Dumper;
local $Data::Dumper::Terse = 1;
my $hashref = {
aaa => 1,
bbb => 2,
ccc => 3,
};
print "hashref : " . Dumper($hashref);
my $evalled = eval(Dumper($hashref));
print "evalled : " . Dumper($evalled);
__output__
hashref : {
'ccc' => 3,
'bbb' => 2,
'aaa' => 1
}
evalled : {
'ccc' => 3,
'bbb' => 2,
'aaa' => 1
}
Although you'll want to be careful you're not dumping a self-referential data structure
use Data::Dumper;
local $Data::Dumper::Terse = 1;
my $x;
$x = \$x;
__output__
\$VAR1
See. the
Data::Dumper docs for more info.
HTH
_________
broquaint