No such thing as a small change | |
PerlMonks |
Re: Re: Longest Common Substringby Enlil (Parson) |
on Apr 09, 2003 at 19:15 UTC ( [id://249362]=note: print w/replies, xml ) | Need Help?? |
BrowserUK's solution doesn't quite work I tried the following and did not get back what was expected ( " the quick brown fox "): and got back 'the lazy dog' (it works if you reverse the $needle and the $haystack. But to his credit it seems to work better than String-LCSS-0.10, and he did mention that it might be incomplete (run it both ways, get the longest string and print that, I believe should give you the most right answer, but my tests might also be incomplete). Where which running the following code: prints only 'lazy dog' (again it works reversing the $needle and the $haystack). I would use Algorithm-Diff using this part of the documentation as a starting point. Note: The Author of String-LCSS-0.10 has been notified. -enlil
In Section
Seekers of Perl Wisdom
|
|