Re: Return number of keys in a hash of hash? Looping through "sub hash"?

2008-01-24 Thread pzimmermann
On Jan 24, 10:12 am, [EMAIL PROTECTED] (Tom Phoenix) wrote: > On Jan 24, 2008 9:07 AM, <[EMAIL PROTECTED]> wrote: > > > I'd like to get the number of keys in hash of hashes. I know that I > > can do something like $count = keys( %myHash ), but how would I go > > about finding the number of keys i

Re: Return number of keys in a hash of hash? Looping through "sub hash"?

2008-01-24 Thread Tom Phoenix
On Jan 24, 2008 9:07 AM, <[EMAIL PROTECTED]> wrote: > I'd like to get the number of keys in hash of hashes. I know that I > can do something like $count = keys( %myHash ), but how would I go > about finding the number of keys in a sub-hash? my $count = keys %{ $sub_hash_reference }; You can

Return number of keys in a hash of hash? Looping through "sub hash"?

2008-01-24 Thread pzimmermann
I'd like to get the number of keys in hash of hashes. I know that I can do something like $count = keys( %myHash ), but how would I go about finding the number of keys in a sub-hash? Alternately, how could I loop through keys in a hash of a hash? My hash look like: -Part Number 1 --Type 1 (key)