use HTML::TableExtract; my $te = HTML::TableExtract->new( attribs => { id => 'historicalTable' }, ); $te->parse_file(\*DATA); $te->first_table_found->dump(1);