http://www.perlmonks.org?node_id=33575

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I've got several hash of hashes, i.e. :
$hash{name} = { date => "09-22-00", city=>"Chicago",};
I want to pass this to a function like this:
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"}; } }