in reply to Hash Ref: Need to find out how many children I have :-)
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
|
---|