in reply to Matching specific strings (are subs a good idea?)

You should consider to use something like XML::LibXML, XML::Twig or XML::LibXML::Simple for your XML files - if you are allowed.

Regards, Karl

«The Crux of the Biscuit is the Apostrophe»

perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help