in reply to longest common substring

This appears to be a bug in the module. If you append ' 25' and ' 26' to $s1 and $s2 respectively, the function works as expected. I would suggest that you follow L~R's advice and give String::LCSS_XS a try, as it's 4 years more current.

- Miller

Replies are listed 'Best First'.
Re^2: longest common substring
by flaviusm (Acolyte) on Dec 31, 2007 at 21:26 UTC

    I just installed the module you suggested and it works as expected.

    Thank you very very much Miller and L~R

      I would hope that it is actually returning a space in front of the value that you said that you were expecting. Though, the documentation for String::LCSS is so minimal that I'd be wary of making any assumptions at all about what it does without first digesting the source code.

      - tye