in reply to Simulating a summary of a hash
sub somefunction { my ($href, $key) = @_; my %counts; $_->{$key} && ++$counts{$_->{$key}} for values %$href; return %counts; } [download]