HTML tables

[email protected] (Bianca Shibuya)
Newsgroups perl.macosx
Message-ID <[email protected]>
Hi there,

Anybody can help me in this?

I have this piece of code:

use Text::CSV; 
use Date::Manip qw(ParseDate UnixDate);
use LWP::Simple;
use URI; 
use HTML::TableContentParser; 
use HTML::Entities; 
 
sub get_tables {
   my $URL = shift; 
   my $page = get($URL);
   die "Couldn't get $URL" unless defined $page;
   my $tcp = HTML::TableContentParser->new();
   return $tcp->parse($page);  
}

my $URL = 'http://bugs.mysql.com/bug.php?id=38516';
my $tables = get_tables($URL); #it returns a reference for an array

for $t (@$tables) {
    for $r (@{$t->{rows}}) {
        print "Row: ";
        for $c (@{$r->{cells}}) {
            print "[$c->{data}] ";                          
            }                         
        print "\n";                       
    }
}

It prints "Row: " 9 times, without any data.

Thank you.
Bianca


      Novos endereços, o Yahoo! que você conhece. Crie um email novo com a sua cara @ymail.com ou @rocketmail.com.
http://br.new.mail.yahoo.com/addresses
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.