use strict;
use warnings;
use HTML::HTML5::Parser;
use XML::LibXML::QuerySelector;
use Data::Dumper;
my $url = "http://www.pro-football-reference.com/boxscores/198509080ram.htm";
my %data = HTML::HTML5::Parser
-> load_html(location => $url)
-> querySelectorAll('table#game_info tr') # get all rows from game_info table
-> grep(sub { not $_->{class} eq 'thead' }) # ignore class="thead" row
-> map(sub { # map each row into a key, value pair
my ($key, $value) = $_->querySelectorAll('td');
return $key->textContent => $value->textContent;
});
print Dumper \%data;