in reply to using tie on hash of hashes

The MLDBM module will give you the capability you desire.

Replies are listed 'Best First'.
Re: Re: using tie on hash of hashes
by rob_au (Abbot) on Aug 17, 2002 at 14:57 UTC
    ++Anonymous Monk ... One important thing to note about tied hashes with MLDBM though is that the value of a hash should be copied to a temporary variable prior to its manipulation. From the BUGS section of the module POD ...

    $mldb{key}{subkey}[3] = 'stuff'; # won't work tmp = $mldb{key}; # retrieve value $tmp->{subkey}[3] = 'stuff'; $mldb{key} = $tmp; # store value

    This limitation exists as a result of the Perl TIEHASH interface having no support for multidimensional ties. I wrote about this topic in a more general way in The importance of context in debugging.