in reply to Need Example of Saving and Retrieving Hash from File

You could use do like this:
my %hash = ('foo' => 3, 'bar' => 'baz'); open my $out, '>', 'A_tmp_file' or die "Damn: $!"; print $out Dumper(\%hash); close $out or die $!; my $ref = do 'A_tmp_file' or die "Noo: $!"; print "$ref->{'bar'}\n";
See "perldoc -f do"

Replies are listed 'Best First'.
Re^2: Need Example of Saving and Retrieving Hash from File
by EchoAngel (Pilgrim) on Mar 29, 2005 at 15:01 UTC
    thanks a lot!