CountZero++!
However, HTML Tidy is not a Perl module, it's a stand alone application that corrects common HTML errors. You can get a copy here. The technical term for such a piece of software is a "Lint". Don't ask me, I don't know where they got the name.