Data::Walk will walk the structure easily for you, and by hand crafting a wanted() sub, you can set up counters for various depths.
Or if you already have worked out how to walk the structure, remember that my $count = keys %{$hash};, or later my $count = keys %{$hash->{Group}} will return a count of the number of keys in a given level.
Dave
In reply to Re: Hash Ref: Need to find out how many children I have :-)
by davido
in thread Hash Ref: Need to find out how many children I have :-)
by rupesh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |