$r =~ s[([a-zA-Z])][$1 lt '[' ? 'U' : 'L']ge;;
But this will be vastly more efficient:
$r =~ tr[A-Z][U]; $r =~ tr[a-z][L];
In reply to Re: change [A-Z] to U, [a-z] to L with one regex?
by BrowserUk
in thread change [A-Z] to U, [a-z] to L with one regex?
by Doctrin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |