in reply to Simple Encryption question

I am assuming your mapping in the question is wrong, and should be 0=A, 1=B, 2=C... 9=J. If not, change it in the code.
$var =~ tr/0-9/A-J/;
perldoc perlop and look for the tr// operator for more info.