#!usr/bin/perl
use English '-no_match_vars';
use strict;
use warnings;
use Bio::Perl;
my $database = 'genbank';
my $format = 'fasta';
my @accessions = ( "bunch", "of", "accession", "numbers");
for my $i ( 0 ... 2000 ) {
my $entry_id = $accessions[$i];
eval {
my $sequence = get_sequence($database, $entry_id);
write_sequence( '>-', $format, $sequence );
};
if ( $EVAL_ERROR ) {
# Log Error here if an error occured
print {*STDERR} "Could not download sequence: [$entry_id]/n";
}
# If you need to keep track of count
my $count = $i + 1;
}