my $string1 = "123"; if($string1=~/[^0-9]/){ print "Keine Zahl"; }