unless ($str =~ tr/1-5//c){ print "Valid\n"; }else{ print "Invalid\n"; } [download]
In reply to Re: Detect presence of numbers 1-9 by perlplexer in thread Detect presence of numbers 1-9 by kiat