#!/localperl/bin/perl use strict; use warnings; use Bio::SeqIO; my $inseq = Bio::SeqIO->new(-file => '/home/zhaoy/document/perl/lwp/seq.txt',-format => 'FASTA' ) or die "can't open"; while (my $seq = $inseq->next_seq()) { print $seq->accession_number,"\n"; }