in reply to Removing Poly-ATCG from and Array of Strings

ewijaya,
Ok - I had an idea in my head that didn't pan out the way I expected. I would be interested in seeing what I ended up with benchmarked with some real sample data though.
sub remove_poly { my ($list, $threshold) = @_; return map { my $lim = $threshold * length $list->[$_]; my (%cnt, $excede); for ( unpack 'U*', $list->[$_] ) { $excede = 1, last if ++$cnt{$_} > $lim; } $excede ? () : $list->[$_]; } 0 .. $#$list; }

Cheers - L~R