in reply to Re: string translation
in thread string translation

And to do it all in one step:
$string =~ s/^(.*)(.{3})$/\U\1\L\2/;
See perlop for the \U and \L escapes.

Wondering what would happen if the string was three characters or less led me to this, which might be something the AM might consider.

$string =~ s/^(.*?)(.{1,3})$/\U$1\L$2/;