in reply to Do I have to explicitly tell keys() that the hash in my hash of hashes is a hash?

Yes you do need to explicitly tell keys its a hash. Annoying at times, but necessary.
use strict; use warnings; my $hash={a=>{b=>1},c=>{d=>1}}; foreach my $key (keys %$hash) { print "$key\n"; foreach my $subkey (keys %{$hash->{$key}}) { print "\t$subkey\n"; } }
So theres the simple way and the complicated way...

HTH

Yves / DeMerphq
--
This space for rent.

  • Comment on Re: Do I have to explicitly tell keys() that the hash in my hash of hashes is a hash?
  • Download Code