in reply to Iterating single line within a For Loop

Untested

use Bio::SeqIO; $infile = Bio::SeqIO->new(-file => $ARGV[0] , '-format' => 'Fastq'); $outfile = Bio::SeqIO->new(-file => ">myfilename" , '-format' => 'genb +ank'); while ( my $seq = $infile->next_seq() ) { ...do something... # finally you could print to $outfile in genbank format (for example... or in embl, nexml, bsml, fasta, seqxml...) $outfile->write_seq($seq); }