#!/usr/bin/perl -w use Data::Dumper; my %hash = ('foo' => 'bar', 'camel' => 'beast', 'bug' => 'spray'); #dump the structure open (FILE, '>/tmp/hash') or die "$!\n"; print FILE Dumper(\%hash); close FILE; #recreate the structure open (FILE,'/tmp/hash') or die "$!\n"; my $data = do { local $/; }; my %newhash = %{eval $data}; #### use Storable; store \%hash, '/tmp/hash'; my %newhash = %{retrieve('file')};