in reply to Problem in "index" function in recognizing repeating substrings

#!/usr/bin/perl -w use strict; my $str = 'NNNNNATCGNNNNATCG'; my @substr = qw(ATCG ATCG); my $id = -1; foreach (@substr) { $id = index($str, $_, $id+1); print "$id\n"; }
---
my name's not Keith, and I'm not reasonable.
  • Comment on Re: Problem in "index" function in recognizing repeating substrings
  • Download Code