|Problems? Is your data what you think it is?|
frame shift in Perl string matchingby GTI (Initiate)
|on Oct 09, 2012 at 04:18 UTC||Need Help??|
GTI has asked for the
wisdom of the Perl Monks concerning the following question:
I'm using perl to analyze strings and need some suggestions on a seemingly easy problem.
What I want is to count occurrence of a keyword, $search, in my source string, $aa.
OUTPUT is 2, as the frame shifted 2 letters each step. But I want the frame to be shifting one letter each step, resulting in 3.
It seems there should be easier ways to achieve this, rather than using conditions and loops.
Thank you for your help and guidance.