Your mixed case test will not work the way you intended
/[a-zA-Z]/ matches any lower- or uppercase character, not a lower- and then an uppercase one.And your two substitutions will not flip the case of a character because after the first substitution (i.e. s/([a-z])/\u$1/g) all characters are uppercase and will be changed to lowercase at the second substitution.
In reply to Re^2: Reversing string case
by Anonymous Monk
in thread Reversing string case
by perlpal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |