in reply to Re: Testing a string for a range of characters
in thread Testing a string for a range of characters
Here are two ways to use tr/// to get a complete solution to the problem, checking both the length and the contents of the string:
length $test_char == 1 and $test_char =~ tr/A-Z//;
$test_char =~ tr/A-Z// == 1 and $test_char =~ tr/A-Z//c == 0;