No such thing as a small change | |
PerlMonks |
Re: Problem in "index" function in recognizing repeating substringsby Tanalis (Curate) |
on Sep 02, 2005 at 09:35 UTC ( [id://488587]=note: print w/replies, xml ) | Need Help?? |
index accepts a position to start from as a third argument. If you track $id to figure out where in the string you are, you should be able to avoid matching the first instance repeatedly.
See the docs for more information. -- Tanalis
In Section
Seekers of Perl Wisdom
|
|