in reply to Measuring Substrings Problem

I wonder if you might be able to make use of Text::LevenshteinXS?