#!/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"; }
In reply to Re: Problem in "index" function in recognizing repeating substrings
by reasonablekeith
in thread Problem in "index" function in recognizing repeating substrings
by monkfan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |