#!usr/bin/perl ####extracting table having table id #### use Modern::Perl; use WWW::Mechanize; use HTML::TableExtract; open(my $OUT, '>>', 'papa') or die "Could not open file $!"; my $mech = WWW::Mechanize->new(); $mech->get('http://xxx.com/tempo/TYPE_CAT/AGL_CROPC0820200.HTM'); my $html_string = $mech->content(); my $te = HTML::TableExtract->new();####extracting all table #### $te->parse($html_string); foreach my $ts ( $te->tables ) { print "Table (", join( ',', $ts->coords ), "):\n"; foreach my $row ( $ts->rows ) { $OUT-> print( join( ',', @$row ), "\n"); } }