Sorry, I'd missed another problem in your code - you are trying to load a fasta file using Bio::PrimarySeq. To read sequence data from a file you should use Bio::SeqIO, see: http://www.bioperl.org/wiki/HOWTO:Beginners#Retrieving_a_sequence_from_a_file http://www.bioperl.org/wiki/HOWTO:SeqIO Cheers, Roy.