Is there anything 'XML-specific' about this? Simple substitution, using
sed seems to be the easiest way to meet your spec.
Code:
sed s/mykey1/NEWVALUE/g filename.xml
If it has to be Perl, and is truly an XML parsing exercise, then you need to look at using a full-on XML parser package, such as
XML::Simple,
XML::Parser, or several others available on CPAN.
--- rod.