in reply to Comparing lower to upper case

Why not

$str=~tr/a-z/A-Z/;

This will leave all the digits alone and just change the lowercase characters to uppercase.
-Jason