in reply to Delete from string through s///

You might look at XML::XSH and the xsh scripting language. It's a nice mix of XML XPath together with arbitrary Perl. I did a column with xsh, and the sourceforge site contains a great set of tutorials and documentation.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.