bhuber has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl my $FILENAME = "file.html"; open (FILE, $FILENAME); use HTML::TableContentParser; $table_cp = HTML::TableContentParser->new; $tables = $table_cp->parse($FILENAME); my $info = $tables->[0]; foreach $row (@{$info->{rows}}) { foreach $col (@{$row->{cols}}) { $data = $col->{data}; print "$data\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Help extracting tables from an html file
by talexb (Chancellor) on Nov 16, 2007 at 21:28 UTC |