Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: Fixing Bad HTML

by Chmrr (Vicar)
on Nov 17, 2002 at 03:07 UTC ( #213501=note: print w/replies, xml ) Need Help??

in reply to Fixing Bad HTML

HTML::TreeBuilder does a good job of finding and closing such problems when it parses, as well as adding some implicit tags that get forgotten. The following line-liner should be enough to get you started:

perl -MHTML::TreeBuilder -ne 'print map {ref $_ ? $_->as_HTML : $_} HTML::TreeBuilder->new_from_content($_) ->look_down(_tag=>"body")->content_list'

perl -pe '"I lo*`+$^X$\"$]!$/"=~m%(.*)%s;$_=$1;y^`+*^e v^#$&V"+@( NO CARRIER'

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://213501]
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: (10)
As of 2016-10-28 08:02 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (377 votes). Check out past polls.