I have written a hash structure into a file using
print FILE Data::Dumper->Dump([$x], [ qw(*x) ]);
How do I read this back from file? If I use eval as shown in the following snippet, all I get is $VAR1 = undef;
local $/; $hash_ref = eval <FILE>;
You can use the core module Storable to do this type of task.
use Storable;
store \%table, 'file';
$hashref = retrieve('file');