while () { my $seq; $results[$seq++]{$_}++ for split '', (split /\s+/)[1]; }