It may be useful to stop and ask why one would want to do that. Is there some compelling practical reason? Sometimes we just get caught up in the mindset that it's more elegant to condense as much as possible, but it's not always. The original code
in reply to change [A-Z] to U, [a-z] to L with one regex?
is so crystal clear and simple. It's probably pretty darn efficient too. Why garble it up just to save a line?
$r =~ s/[A-Z]/U/g;
$r =~ s/[a-z]/L/g;
Time flies like an arrow. Fruit flies like a banana.