if($myvar=~/X+/) { print "ERROR\n"; } [download]
In reply to Check if a variable contains only one letter? by Anonymous Monk