in reply to Re: num keys of the hash within hash?
in thread num keys of the hash within hash?
Please note:>perl -wMstrict -le "my $hashref = { first => { foo => 'bar', bar => 'baz', flop => 'floodle' }, second => { bar => 'foo', baz => 'bar', etc => 'plodle' }, }; foreach ( keys %{$hashref} ) { print qq{$_ contains } . scalar(%{$hashref->{$_}}) . qq{ keys.}; } " first contains 3/8 keys. second contains 3/8 keys.
|
|---|