cafaro has asked for the wisdom of the Perl Monks concerning the following question:

$mech->get($url); $content = $mech->content();

$te = HTML::TableExtract->new(depth => 0); $te->parse($content); $te->first_table_found; print $te->cell(2,2);

# Error I receive: # Can't locate object method "cell" via package "HTML::TableExtract"

Replies are listed 'Best First'.
Re: HTML::TableExtract (parse table column from an HTML page)
by erroneousBollock (Curate) on Oct 07, 2007 at 11:15 UTC
    Probably something like:
    my $te = HTML::TableExtract->new(depth => 0); $te->parse($content); my $table = $te->first_table_found; my $tree = $table->tree; print $tree->cell(2,2);
    -David
      That isn't working either. This is the error I receive: "Can't call method "tree" on unblessed reference"
        That's straight from the documentation, so it probably can't find a table in the HTML source you've given it.

        -David