my $match = '[^\D]'; print "non digits found" if $str !~ /$match/g;