in reply to num keys of the hash within hash?
Use keys in scalar context. ie my $count = keys %hash; [download]
my $count = keys %hash; [download]