$count{$_}++ for @names #### DB<135> @name=qw/rachel raymond matthew roger betty melissa judith charlie/ DB<136> push @{ $group{length $_} } , $_ for @name DB<137> \%group => { 5 => ["roger", "betty"], 6 => ["rachel", "judith"], 7 => ["raymond", "matthew", "melissa", "charlie"], }