in reply to Re: Reversing string case
in thread Reversing string case
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.
|
|---|