use strict; use warnings; use Bio::SeqIO; #initialize a bioperl object instance my $in = Bio::SeqIO->new(-file=> "database_filename.fa", -format=>"fasta"); while(my $seq = $in->next_seq){ #read the sequences in the bioperl object print $seq->id," ",$seq->seq; #output,ID space-separated from sequences print "\n"; }