use strict; use warnings; while () { if (/^(10|\d)$/) { print "Match for $_"; } else { print "Rejected $_"; } } __DATA__ 0 1 9 10 11 20 99 100