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

Another way is to use map on the original array and set all the entries which you don't want to '', and filter those out lateron..
my @set = qw (AAAAAT ATCGAT TTTTTG GCCCCC GTGGGG); my $lim = 0.75; my $len = length $set[0]; print "BEFORE:",scalar(@set),"\n"; map { ( ((tr/A//)/$len < $lim) && ((tr/T//)/$len < $lim) && ((tr/C//)/$len < $lim) && ((tr/G//)/$len < $lim) ) or $_ = '' } @set; print "AFTER:",scalar(@set),"\n";
Now the @set contains:
$VAR1 = ''; $VAR2 = 'ATCGAT'; $VAR3 = ''; $VAR4 = ''; $VAR5 = '';

.:| If it can't be fixed .. Don't break it |:.