in reply to Re^2: FInding the longest match from an initial match between two files
in thread FInding the longest match from an initial match between two files

Your uninitialized value is most likely due to trying to access an element beyond the end of one of the two arrays. Consider what happens when the content of the two arrays is identical.

I haven't looked at the logic of your code in any detail, but my impression is that you are not taking any advantage of the string processing power that Perl provides. In particular splitting strings up into arrays of characters smells really bad.

Premature optimization is the root of all job security
  • Comment on Re^3: FInding the longest match from an initial match between two files