if ($text =~ /\D/) {print "It's not a number.";}
$text = "Hello!"; if ($text =~ /\D/) {print "It's not a number.";}