local*FH; open (FH, '>/tmp/somefile.txt'); $te->parse($content); # $content is your HTML page from LWP::Simple foreach my $ts ($te->table_states) { print FH "Table (", join(',', $ts->coords), "):\n"; foreach my $row ($ts->rows) { print FH join(',', @$row), "\n"; } } close FH;