Advice on HTML editting

Victoria Conlan vicky at
Thu Apr 29 11:14:40 BST 2010

It's been a while since I actually got to write some Perl (considering what
I do for a living!), so I thought I'd try and make this one as sensible as
possible.  I've hit a snag in my implementation.

I have <bunch of rather complicated web pages>.
I want to

loop through them
 	pick out all the image tags
 	change the path of some (particular ones, not arbitrary!)
 	save the new html (possibly with a backup, but not essential)
(then some other stuff)

My first thought was a simple RE, then I decided that was silly and started
looking at modules.  HTML::Parser and HTML::TreeBuilder are what I've looked
at so far.

But my concern is, if I use HTML::TreeBuilder to re-output the html, is it
going to be close enough to the original not to cause OtherIssues?  (I'm
about to experiment a bit with what it does output, it's just a gut feeling
that is now swaying me away from it)

Any advice (particularly on how best to use the modules already looked at,
or more appropriate modules to try out) appreciated.


More information about the mailing list