Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: HTML::TreeBuilder

by integral (Hermit)
on Apr 11, 2003 at 16:04 UTC ( #249912=note: print w/ replies, xml ) Need Help??


in reply to HTML::TreeBuilder

Use the $tree->content_list method and concatenate all the non-element nodes, so get just the text for this element. The full list of methods can be seen in the documentation for HTML::Element.

$text = join '', grep { not ref $_ } $tree->content_list;

--
integral, resident of freenode's #perl


Comment on Re: HTML::TreeBuilder
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://249912]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (14)
As of 2015-07-28 11:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (254 votes), past polls