in reply to Using Storable Module with Multiple Hashes

I'd assume that you just use Storable to store an array of hash refs.

  • Comment on Re: Using Storable Module with Multiple Hashes

Replies are listed 'Best First'.
Re^2: Using Storable Module with Multiple Hashes
by Thilosophy (Curate) on Jun 20, 2005 at 11:43 UTC
    Or a hash of hash refs, if you like to retrieve them by name later.

    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};
      That works well.
      Just in case anyone else needs to use this
      I think that the actual hashes are found by
      %aa = %{$hashref->{a}}; %bb = %{$hashref->{b}};
      Thanks to the Janaury helper monk