The fastest way to n-tuple long strings is using unpack:
$text = 'howdoidoit';; print for unpack '(a3X2)*', $text;; how owd wdo doi oid ido doi oit it it print for unpack '(a4X3)*', $text;; howd owdo wdoi doid oido idoi doit oit oit oit
You have to discard the last n-1 results but that is very quick and simple to do.
In reply to Re^4: Exact string matching
by BrowserUk
in thread Exact string matching
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |