in reply to
Stripping headers from a HTTP reply
I think that using the ->content() method instead of ->as_string() will limit it to what you're looking for.
Comment on
Re: Stripping headers from a HTTP reply
In Section
Seekers of Perl Wisdom