print "'$str' starts with lowercase\n!" if substr($str,0,1) =~ /[a..z]/; #### print "Only -+()0..9 allowed!\n" if $str =~ /[^+-()0..9]/;