in reply to LWP on Windows: whitespace removed from HTML

I don't know the answer to your question but you can use HTML::TreeBuilder and the as_html method to re-print the HTML with whitespace...