#!/usr/bin/perl use strict; use warnings; use Data::Dumper; use HTML::TableExtract; my $te = new HTML::TableExtract (); $te->parse ($html_string); my $name = 'bob'; my %results; foreach my $ts ($te->tables) { my ($header_row, @content_rows) = $ts->rows; my ($placeholder, @headers) = @$header_row; foreach my $data_row (@content_rows) { my( $type, @real_data ) = @$data_row; foreach my $i (0 .. $#headers) { my $hash_key = join( '_', lc($name), lc($headers[$i]), lc($type) ); $results{ $hash_key } = $real_data[$i]; } } } print Dumper( \%results ); exit;