Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I've got several hash of hashes, i.e. :
I want to pass this to a function like this:$hash{name} = { date => "09-22-00", city=>"Chicago",};
function (\%hash); function (\%hash1); function (\%hash2); sub function { # now I want to use the reference to access the hash I just # passed, but I'm not sure how. I need to add items to the # hash of hashes as well. # this will flatten the hash, I'd prefer to just know the # name of the hash I just passed %hash_reference = @_; for $key (keys %hashreference){ $hashreference{$key} ={moredata=>"datadatadata"}; } }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: how do I use a hash of hashes reference to a function ?
by Fastolfe (Vicar) on Sep 22, 2000 at 02:28 UTC | |
by Fastolfe (Vicar) on Sep 22, 2000 at 02:31 UTC | |
Re: how do I use a hash of hashes reference to a function ?
by arturo (Vicar) on Sep 22, 2000 at 18:33 UTC | |
by Fastolfe (Vicar) on Sep 22, 2000 at 19:55 UTC |
Back to
Seekers of Perl Wisdom