jkmiller has asked for the wisdom of the Perl Monks concerning the following question:
Here is the output#!/usr/bin/perl -w open (IN, "one.seq.one.line"); open (OUT, ">out.index.pl"); while(<IN>){ 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"; }
Note that the last line does NOT give the position ofATGGACTGCACCTGGAGGATCCTCTTCTTGGTGGCAGCAGCTACAGgcaagagaatcctgagttccaggg +ctgatgaggg 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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Funny results of "index"
by Zaxo (Archbishop) on Jul 16, 2004 at 22:20 UTC | |
|
Re: Funny results of "index"
by eric256 (Parson) on Jul 16, 2004 at 22:19 UTC | |
|
Re: Funny results of "index"
by hossman (Prior) on Jul 17, 2004 at 07:01 UTC | |
|
Re: Funny results of "index"
by Anonymous Monk on Jul 16, 2004 at 22:28 UTC |