#UNTESTED CODE TO DEMONSTRATE A WAY AROUND use strict; use warnings; use Bio::SeqIO; my $in = Bio::SeqIO->new(-file =>"FastA.fa", format = "FASTA"); while(my $seq = $in->next_seq){ my $sequence = $seq->seq; #Do something with $sequence my $ORFpattern = "foo"; if($sequence =~ /$ORFpattern/){ #report or anything } }