in reply to Re^2: Reversing string case
in thread Reversing string case

In that case:
my $reversed = $str =~ /\p{Lu}/ ? lc $str : uc $str; # Or my ($reversed) = map {/\p{Lu}/ ? lc : uc} $str;