in reply to using int and the range function

One way using \D:
use warnings; use strict; while (<DATA>) { chomp; print "This is an invalid entry: $_\n" if /\D/; } __DATA__ 555 3 1234 11-55 fadf 000 -402 1 2 1.2