http://www.perlmonks.org?node_id=1097013

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

Hi guys! I am trying to extract some information from a table in an HTML page. Namely, the small chunk of info that you see under "Representative" in the original website. But, although I *think* I am searching for the correct tag, I think I'm getting the whole file instead? Could you please help me find what I am doing wrong?

Here is the code I have so far. I am sorry if this is such a simple question

#!/usr/local/bin/perl use strict; use warnings; use autodie; use Data::Dump; use HTML::Tree; use LWP::Simple qw(get); my $content=get('http://www.ncbi.nlm.nih.gov/genome/?term=Xylella_fast +idiosa'); my $tree = HTML::Tree->new(); $tree->parse($content); my $data =$tree->look_down( '_tag' =>'div', class => 'genome_descr' ); dd $data;

How would you extract those lines (not the table) into an array? What am I doing wrong in the search?

Thanks in advance! You guys rock!