in reply to Re: Using Storable Module with Multiple Hashes
in thread Using Storable Module with Multiple Hashes
In both cases, if you want to store hashes %a, %b, and %c with Storable, just store the compound structure instead:
use Storable; store [ \%a, \%b, \%c] , 'file'; # or store { a => \%a, b => \%b, c => \%c} , 'file'; my $arrayref = retrieve('file'); my $a = $arrayref->[0]; # or my $hashref = retrieve('file'); my $a = $hashref->{a};
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Using Storable Module with Multiple Hashes
by merrymonk (Hermit) on Jun 20, 2005 at 16:48 UTC |