Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Welcome to the Monastery
 
PerlMonks  

Re: Re: How to get HTML::Parser to return a line of parsed text

by donfreenut (Sexton)
on Feb 06, 2001 at 20:13 UTC ( #56683=note: print w/ replies, xml ) Need Help??


in reply to (jeffa) Re: How to get HTML::Parser to return a line of parsed text
in thread How to get HTML::Parser to return a line of parsed text


Unless I don't understand your code as well as I'd like (and I might not - a. I'm new at this and b. I'm using the NEW way :), this is what I'm already doing, more or less. The problem is that your script prints the plaintext, and I want the plaintext in a variable - however that can be accomplished.

I tried this:

my $HTMLParser = HTML::Parser->new(text_h => [sub {return shift;}, "te +xt"], default_h => [""]);

But that, of course, just returns the line of HTML, unparsed.

Any further ideas, anyone?


Comment on Re: Re: How to get HTML::Parser to return a line of parsed text
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2014-04-20 11:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls