See perlop for the \U and \L escapes.$string =~ s/^(.*)(.{3})$/\U\1\L\2/;
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/;
In reply to Re^2: string translation
by shenme
in thread string translation
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |