Good evening, i have a bioperl code to count the number of sequences in a fasta file, but i am trying to modify the code to count sequences shorter than 20 and longer from 120 in any given fasta file. The code is below
use strict;
use Bio::SeqIO;
my $seqfile = 'sequences.fa';
my $in = Bio::SeqIO->new
(
-format => 'fasta',
-file => $seqfile
) ;
my $count = 0;
while (my $seq = $in->next_seq)
{
$count++;
}
print "There are $count sequences\n";