in reply to Compare text similarity
Data::Compare will tell you if data structures are identical, not similar as OP mentioned. Take a look at some of the existing responses for recommendations.