- Compare two strings of html this module compares two strings of html and returns a list of a chunks which indicate the diff between the two input strings, where changes in formatting are considered changes. html::diff does not strictly parse the html. instead, it uses regular expressions to make a decent effort at understanding the given html. as a result, there are many valid html documents for which it will not produce the correct answer. but there may be some invalid html documents for which it gives you the answer you're looking for. your mileage may vary; test it on lots of inputs from your domain before relying on it.