I did a quick search, and came up with String::Approx, but its documentation states that:
NOTE: String::Approx has been designed to work with strings, not with text. In other words, when you want to compare things like text or source code, consisting of words or tokens and phrases and sentences, or expressions and statements, you should probably use some other tool than String::Approx, like for example the standard UNIX diff(1) tool, or the Algorithm::Diff module from CPAN, or if you just want the Levenshtein edit distance (explained below), the Text::Levenshtein module from CPAN. See also Text::WagnerFischer and Text::PhraseDistance.