in reply to grab HTTP Response and Headers
with:$results = $ua->request($req)->as_string; #grab the results
When I ran your snippet, it printed out the whole response, not just the headers.$results = $ua->request($req)->headers_as_string; #grab the results
use strict; use LWP::Simple qw(get head); my $url = 'http://www.w3c.org'; print head($url)->{_headers}->as_string;
|
---|