use Bio::DB::Fasta;
open(POSITIONS,"positions.txt");
while(<POSITIONS>){
chomp;
my ($seqName,$begin,$end) = split(/\s/);
my $db = Bio::DB::Fasta->new('allGenomeContacted.fa');
my $seq = $db->seq("$seqName", $begin => $end);
print "$seq\n";
}
close(POSITIONS);