in reply to How can I delete the MIME Headers

Use HTML::Parser