in reply to Filter "Nan" from user input
Perhaps Scalar::Util::looks_like_number would work for you...