in reply to Parsing this HTML description
This probably isn't what you want to learn, but with HTML::Tree (and HTML::Element) it's easy (though this is untested pseudo-code)
use strict; use HTML::Tree; my $tree = HTML::Tree->new_from_content($html_from_lwp); my $description = $tree->look_down( "_tag", "div", "class", "text12"); + my $trimmed_text = $description->as_text();
This assumes that you want the first <div> where class = text12.
|
|---|