I'm trying to grab the 'keywords' from the header of a web page. I found in Perl & LWP, where I thought '$response->header('keywords')' would grab this for me. But as of yet it has not worked, nor have I been able to figure out why it isn't working.
I've looked at the docs for LWP, LWP::Simple, LWP::UserAgent, lwpcook, just to name a few.
Thanks for any suggestions.
my $browser = LWP::UserAgent->new();
$browser->env_proxy(); # if we're behind a firewall
my $url = 'http://www.somewebsite.com/';
my $response = $browser->get($url);
die "Error \"", $response->status_line(),
"\" when getting $url" unless $response->is_success();
my $keywords = $response->header('keywords');