On Sun, Apr 06, 2003 at 08:35:29PM -0700, Nicholas G. Thornton wrote:
> For a program I'm writting I'm making a complex data structure, a hash of
> hashes. I'm constructing a hash along the way, then trying to insert that hash
> into the larger hash. Problem is I'm not sure precicely how to do it.
> 
> $external_hash{'key'} = %internal_hash;
> 
> gives a fraction, which I've discerned to be a reference based off of the
> errors. \%internal_hash obviously gives a reference and in the more normal
> format. So what's the trick?

Either $external_hash{'key'} = \%internal_hash or
$external_hash{'key'} = { %internal_hash } .

A hash in scalar value returns a string of the form NNN/MMM where MMM is
the number of allocated buckets and NNN is the number of occupied buckets
in the hash.

Ronald

Reply via email to