On Wed, May 26, 2010 at 04:23:41PM +0100, Dirk Koopman wrote: > So it seems I shall have to format it first. HTML::Tidy seems only to do > checking. I used to think this too: http://use.perl.org/~tomhukins/journal/27445 I've not used HTML::Tidy in a while, but I suspect its clean() method does what you want. Tom