From the HTTP::Response and HTTP::Message (from which HTTP::Response is descended) documentation:
$r->as_string Returns a textual representation of the response. Mainly useful for debugging purposes. It takes no arguments. $mess->content([$content]) The content() method sets the content if an argument is given. If no argument is given the content is not touched. In either case the previous content is returned.
Have you tried both and noted what their results are? I suspect content returns the content of the response, while as_string returns a string representation of the response object as a whole, which likely includes things like HTTP status information and headers. Since most HTTP objects are based upon a textual HTTP message of some kind, you will typically find that they usually support an "as_string" method to un-do that parsing, giving you what should ordinarily be the same textual HTTP response that was given in the first place.

In reply to Re: LWP $req-content vs $req-as_string by Fastolfe
in thread LWP $req-content vs $req-as_string by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.