Help for this page
if ($string =~ m!(^[a-z0-9]{4})$!) { $string =~ tr/[a-z]/[A-Z]/; # do something } else { # do some error }