in reply to Data::Dumper and eval
I would make your eval code a little more robust, to check for errors in the eval'd structure.
This is a nasty hack and not a good solution to persistance however ;)use strict; use Data::Dumper; my %somehash; open DATA, "$ARGV[0]" or die "$!"; { local $/; my $code = <DATA>; my $VAR1 = eval $code; if($@) { die "eval: $@\n"; } %somehash = %$VAR1; } print Dumper(\%somehash);
|
---|