Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

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 => ''});</kbd>

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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://97597]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (11)
As of 2018-06-22 16:15 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (124 votes). Check out past polls.