There is one difference between your algorithm and Grandfather's. His code returns the longest substring for each pair of input strings.
With my original data set your code returns one substring. Grandfather's code returned over three thousand (where $minmatch = 256). On the other hand your code finds multiple occurrences of the longest common substrings, if they all have the same length, which I like.