Can some suggest a good way to cleanup the HTML that is output when a perl script is run using the CGI module?

I tried to install HTML::Tidy, but couldn't as i was missing libtidy.
And I don't want to go through 700 lines of code and putting up loads of '\n' here and there!

CGI::Pretty comes with perl. I leave it up to you to read the documentation.