in reply to Replace every character that occurs more than one and their occurences are even
This would work, for example:
foreach(@array) { $_ =~ s/(\w)\1/XY/g; print "$_ "; # --> dXYmon jXYz stXYr cXYXYar XYXYb XYXYXYXYXY +b } [download]