#!/usr/bin/perl -w use strict; printf "Perl %vd\n",$^V; while(){ print $_; for my $letter ('a' .. 'z') { my $index = index($_,$letter); next if $index < 0; print "The first occurence of '$letter' is: ", $index, "\n"; } print "\n\n"; } __DATA__ ATGGACTGCACCTGGAGGATCCTCTTCTTGGTGGCAGCAGCTACAGgcaagagaatcctgagttccagggctgatgaggg