use warnings; use strict; for (qw(1 2 3 4 20.5 97 -5)) { if (($_ >= 1) and ($_ <= 75) and (!/\./)) { print "$_ yes\n"; } else { print "$_ no\n"; } } __END__ 1 yes 2 yes 3 yes 4 yes 20.5 no 97 no -5 no