http://www.perlmonks.org?node_id=1008642


in reply to Filter for XML elements

This is an un-Perl answer. I don't know what else you might want to do to this file but have you considered using XSLT instead of Perl? XSLT is designed to handle XML.