I'm making a couple of dangerous assumptions: Assumption 1: You are using
LWP::UserAgent and not
LWP::Simple. Following from that assumption, I must assume (based upon your message) that you know how to use LWP::UserAgent to perform an
HTTP::Request on a given URL, and are able to use
HTTP::Response returned from your request to get your data. From here it gets pretty easy:
print $response->headers_as_string;
This is documented in
HTTP::Response. I'd also take a glance at
HTTP::Headers.