#!/usr/bin/perl -w open (IN, "one.seq.one.line"); open (OUT, ">out.index.pl"); while(){ print OUT $_; print OUT "The first occurance of little a is: ", index($_,"a"), "\n"; print OUT "The first occurance of little c is: ", index($_,"c"), "\n"; print OUT "The first occurance of little g is: ", index($_,"g"), "\n"; print OUT "The first occurance of little t is: ", index($_,"t"), "\n"; print OUT "\n\n"; } #### ATGGACTGCACCTGGAGGATCCTCTTCTTGGTGGCAGCAGCTACAGgcaagagaatcctgagttccagggctgatgaggg The first occurance of little a is: 48 The first occurance of little c is: 47 The first occurance of little g is: 46 The first occurance of little t is: 49