in reply to Need Example of Saving and Retrieving Hash from File
See "perldoc -f do"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";
|
|---|
| 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 |