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

Normally I'm big on using tr///, but in this case, the symmetry of cases suggests using a regex to filter out strings where any character is repeated too many times:
sub remove_poly { my ($array,$lim) = @_; grep { my $max_num = int($lim * length())-1; !/(.)(?:.*?\1){$max_num}/ } @$array; }
update: non-greedy for less backtracking; another update to include length checking for each element.

Caution: Contents may have been coded under pressure.