my $i=0; $counts{$1}[$i++]++ while $string =~ /(.)/g;