I am trying to parse a simple table with two headings and get the rows but I am having a big problem trying to find out how to pass the link to the html or path to the html.
Html is apparently in my desktop itself I have a path but I have no clue how to use that in HTML::TableExtr act.
Lets say I put those headings supposed heading1 and heading2 in place of Data Price
Where should put the link to the html
which is something like /home/jack/desktop/sample.html
I tried doing $html_string="/home/jack/desktop/sample.html" but it does not work at all
what am I supposed to do I appreciate if you can help me out of this .
thanks a lot
Html is apparently in my desktop itself I have a path but I have no clue how to use that in HTML::TableExtr act.
Code:
use HTML::TableExtract;
$te = HTML::TableExtract->new( headers => [qw(Date Price Cost)] );
$te->parse($html_string);
# Examine all matching tables
foreach $ts ($te->tables) {
print "Table (", join(',', $ts->coords), "):\n";
foreach $row ($ts->rows) {
print join(',', @$row), "\n";
}
}
Where should put the link to the html
which is something like /home/jack/desktop/sample.html
I tried doing $html_string="/home/jack/desktop/sample.html" but it does not work at all
what am I supposed to do I appreciate if you can help me out of this .
thanks a lot
Comment