laziness, impatience, and hubris | |
PerlMonks |
Re: Find repeated patterns in stringsby tlm (Prior) |
on Aug 27, 2005 at 14:31 UTC ( [id://487150]=note: print w/replies, xml ) | Need Help?? |
A simple optimization would be to replace with One could get fancier by testing only those cycle lengths that are Also, I think it's simpler just to test for equality of $str and $copy, obviating the xor and the regex:
the lowliest monk
In Section
Cool Uses for Perl
|
|