I'm trying to parse a document and rewrite certain tags
for example the document has stuff like this in it:
<img id="image-1" src="http://site.com/a.gif" />
i know how to pull the text via a regex easily
my $regex= qr|<img id="image-(\d*) src="http://site.com/(\w*)" />
however now i need to replace the node's contents with the output of a function ( which is based on the matches generated ).
can someone please point me in the right direction? this seems like it should be rather simple, but i've been working all weekend and am having trouble wrapping my head around this.