For using data dumper all you havev to do in order to get the data back is use eval to recreate the data structure. Also of note you should also set $Data::Dumper::Purity to 1 if you have nested references
Here is a example:
#Save use Data::Dumper; $Data::Dumper::Purity = 1; open FILE, ">$outfile" or die "Can't open '$outfile':$!"; print FILE Data::Dumper->Dump([$main], ['*main']); close FILE; #restore open FILE, $infile; undef $/; eval <FILE>; close FILE;
In reply to Re: How to save and reload my hash
by neosamuri
in thread How to save and reload my hash
by lepetitalbert
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |