in reply to Getting keys of a hash element

Getting keys of a hash _element_ or getting keys of a hash? The latter would imply that the hash values are references to more hashes, which is very different. Example of the simple case:

foreach $key (sort(keys(%hash))) { print "Key = $key, value= $hash{$key}\n"; }

The whole reference can o' worms looks somethin like this:

foreach $key (sort(keys(%hash))) { print join(/ /,keys(%{$hash{$key}}),"\n"; }
There's probably about a million typos in there, but someone will correct me. =) That'll print out a line with the keys contained in the hash referred to by the values of %hash. Not sure if this is what you want, I'm guessing the first solution is closer to what you mean...

enjoy

Trinary