The HTML::Tree and HTML::Element documentation seems to point to a lot of interesting info, you seem to need something like this:
sub give_me_the_title {
my $element = shift; # some HTML::Element
my $title_element = $element->find_by_tag_name('title');
return $title_element->content_list();
}
I haven't tried this and you really should take a longer look at the docs, it will be worth it in the long run - HTML parsers are complicated for a reason :-)
If you really want to take a shot at making a quick hack, you could take a look at the HTML::Element->as_HTML() method.
Hope this helps...
--
Joost downtime n. The period during which a system
is error-free and immune from user input.
|