#!/usr/bin/perl use strict; use warnings; use LWP::Simple; my $req = head("http://perlmonks.com"); # request if ($req) { print "protocol:\n\t", $req->protocol, "\n"; print "headers->etag:\n\t", $req->headers->{etag}, "\n"; # a leading underscore is considered 'private' # and probably should not be accessed print "_rc:\n\t", $req->{_rc}, "\n"; print "request->uri:\n\t", $req->request->uri, "\n"; print "request->headers->{'user-agent'}:\n\t", $req->request->headers->{'user-agent'}, "\n"; }