$ perl -E 'say "xwz" =~ s/w/y/r' xyz