in reply to Multiple replacements with the exception of previously made replacements.
my $test = 'x x x a x x x b x x x a x x x b x x x'; $test =~ tr/[ab]/[ba]/; print "$test";:w [download]