Nath, Alok (STSD) wrote:
Can anyone point out why it is not outputting anything ?
It is suppose to read an HTML file and display the table contents.
One thing I observed is - It is not entering the for loop and I s
not printing anything ( in print "Table found at ", join(',',
$ts->coords), ":\n";)
#!/usr/bin/perl
use warnings ;
use strict ;
use LWP::Simple ;
use HTML::TableExtract ;
my $html_string = "test.htm" ;
my $te = new HTML::TableExtract(depth=>3,count=>4,gridmap=>1) ;
$te->parse($html_string);
foreach my $ts ($te->table_states)
Instead of using $te->table_states try using $te->tables in the above line.
{
print "Table found at ", join(',', $ts->coords), ":\n";
foreach my $row ($ts->rows)
{
print join(',', @$row), "\n";
print @{$row} ,"\n";
}
}
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>