use strict; use Data::Dumper; { my $hashref = { "aaa" => 1, "bbb" => 2, "ccc" => 3, }; print "hashref : " . Dumper($hashref); my $dumped = Dumper($hashref); print "Dumped: $dumped\n"; my $restored = eval "my $dumped"; warn "\$@ = $@\n"; print "restored: " . Dumper($restored); my $test_2 = eval("my ".Dumper($hashref)); warn "\$@ = $@\n"; print "test_2: " . Dumper($test_2); }
In reply to Re: Data::Dumper and eval
by perlmonkey
in thread Data::Dumper and eval
by shemp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |