Advice on HTML editting

Victoria Conlan vicky at
Thu Apr 29 11:36:15 BST 2010

> For this sort of thing, HTML::Parser should suffice. By default it just prints the HTML it's just parsed, so it's a case of writing a suitable handler to look for the appropriate IMG tags and then mutate them and print them.

Ok, I'll give it a go.  (I got as far as using LinkExtor to extract the
image tags, which happens to have a nice example on cpan ...)

> By way of example of such a filter, below is one of my old throwaway scripts that I used to add a comment to closing </div> tags with the the attributes of the corresponding <div> tag to have some chance of understanding the excessive div-itis that a web designer has just handed me.

Lovely, thank you!

More information about the mailing list