Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Dump Text from HTML

by OeufMayo (Curate)
on Jul 18, 2001 at 14:07 UTC ( #97597=note: print w/ replies, xml ) Need Help??


in reply to Dump Text from HTML

And if you want something more reliable and a bit less brutal:
(require HTML::Parser v.3 or higher)

perl -MHTML::Parser -e '$p=HTML::Parser->new(text_h=>[su b{print shift},"dtext"]);for(@ARGV){$p->parse_file($_)}' file.html <kbd>--
my $OeufMayo = new PerlMonger::Paris({http => 'paris.mongueurs.net'});</kbd>


Comment on Re: Dump Text from HTML
Download Code
Replies are listed 'Best First'.
Re: Re: Dump Text from HTML
by Sigmund (Pilgrim) on Jul 26, 2001 at 14:05 UTC
    hello, and thanks for your reply. i'm just a perl novice, reading carefully the camel book, and i wanted to exchange portability versus elegance! i'm now tryng to optimize my code and make it work well enough to be satisfied by translating the html subset i more frequently find into pages i look at! soon i will post my results. i'm worried about giving this code to someone who hasn't the HTML::Parser module, and so i use regexp. thanks again, and bye SiG

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2015-07-30 04:36 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 (269 votes), past polls