while( my($key, $val) = each %{$rHoH_ProteinFamilies}){ my $size = (keys %{$val->{proteinfamily}); #### my $size = @{[%$val->{proteinfamily}]}/2;