in reply to Pattern Matching

You can use a character class. What's a character class? It's a user-defined set of characters to match. For example, if you wanted your string to contain only characters between a and z, do this:
if ($string =~ /^[a-z]+$/) { # we have a string of at least one character of the range a-z }
You can also negate a character class with the ^ symbol at the start:
if ($string =~ /[^a-z]/) { # if it contains even one character NOT in the range, it doesn't m +eet the criteria # do some error }
That's probably your best bet. If you didn't mind A-Z as well, you could use \W, which matches non-word (\w) characters (which are A-Za-z0-9_). For more gritty details, see perlman:perlre.