in reply to Storable.pm: Storing Multi-dimensional Hashes How?
Personally I always use FreezeThaw for that kind of thing, but I believe they both work in a similar manner (you can also use Data::Dumper if you only want to use standard modules). FreezeThaw and Storable both have a freeze method which serialises a complex data structure and a thaw method which resurrects the original structure. You can therefore do something like this:
use Storable; $serialized = freeze \%structure; # Write $serialised to a file. # Time passes # Read $serialised from a file %structure = %{thaw($serialized)};
If you want to store complex hashes in a DBM file then check out MLDBM on CPAN. It hides all this from you and works with Storable, FreezeThaw and Data::Dumper.
--
|
|---|