To load:open DUMP, ">$dump_path" or die "Couldn't open file to dump: $!"; print DUMP Data::Dumper->Dump([\%coords], ['coords']); close DUMP; # close the city dump
open LOAD, "<$dump_path" or die "Couldn't open file to load: $!"; local $/; $/ = undef; my $struct = <LOAD>; close LOAD; eval { $struct }; # then access %coords as usual
In reply to Re: Saving a %hash
by Amoe
in thread Saving a %hash
by smitz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |