#!/usr/bin/perl -- use strict; use warnings; my $infile = 'C:\Scripts\Working2\Users_0.xml'; my $outfile = 'C:\Scripts\Working2\Users2.xml'; my $find = VerifyHex( '\xe9' ); my $replace = VerifyHex( '\x65' ); open(IF, "<$infile") or die "Could not open $infile $!"; open(OF, ">$outfile") or die "Could not open $outfile $!"; binmode IF; binmode OF; while( my $str = ){ $str =~ s{$find}{$replace}g; print OF $str; } close IF; close OF; sub VerifyHex { my( $str ) = @_; if( $str =~ m/(\\[a-zA-Z0-9][a-zA-Z0-9])/ ){ return "$1"; } die "evil input $str"; } #### C12760 Shilpaé Durgale