Perl tips: saving a hash to the disk

From: Perl Cookbook
use Storable;  store(%hash, "filename");  # later on...   $href = retrieve("filename");        # by ref %hash = %{ retrieve("filename") };   # direct to hash
OR From Perl Monks

#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 ; close FILE;