in reply to Re^2: Warning-free numerification of a string
in thread Warning-free numerification of a string

Either with Fletch's suggestion of looks_like_number from Scalar::Util, or a regex from Regexp::Common, or if actually, you're just expecting a positive integer, a simple regex like  /^\d*$/