in reply to LWP Post Question

LWP comes with lwp-request program, very useful
> lwp-request -USexd -m get http://cpan.org/ LWP::UserAgent::new: () LWP::UserAgent::request: () LWP::UserAgent::send_request: GET http://cpan.org/ LWP::UserAgent::_need_proxy: Not proxied LWP::Protocol::http::request: () LWP::Protocol::collect: read 782 bytes LWP::Protocol::collect: read 1880 bytes LWP::Protocol::collect: read 1256 bytes LWP::UserAgent::request: Simple response: OK GET http://cpan.org/ User-Agent: lwp-request/5.810 GET http://cpan.org/ --> 200 OK Connection: close Date: Thu, 17 Jul 2008 03:20:43 GMT Accept-Ranges: bytes ETag: "a9dc69-f4e-487d100c" Server: Apache/1.3.37 Content-Length: 3918 Content-Type: text/html Content-Type: text/html Last-Modified: Tue, 15 Jul 2008 21:01:00 GMT Client-Date: Thu, 17 Jul 2008 03:24:58 GMT Client-Peer: 66.39.76.93:80 Client-Response-Num: 1 Link: <mailto:cpan@perl.org>; rev="made" Title: CPAN
You can see request headers (option -U). If you examine lwp-request source, you'll see
if ($options{'u'} || $options{'U'}) { my $url = $response->request->url->as_string; print "$method $url\n"; print $response->request->headers_as_string, "\n" if $options{ +'U'}; }
More details in HTTP::Response documentation.