in reply to Question on pattern matching

Joe_Cullity,
If you already know that the string is two characters you can just say
if $str =~ /\D/ { print "non-digit" }
If you want to kill two birds with one stone, you can verify length and digitness in one statement:
if $str !~ /^\d\d$/ { print "wrong length or contains non-digits" }

Cheers - L~R