isint#

Whether a value is an integer, and its sign.

Synopsis#

use Scalar::Util::Numeric qw(isint);
isint(42);       # 1
isint("-42");    # -1
isint(4.2);      # 0

What you get back#

1 for a non-negative integer within the unsigned range, -1 for a negative integer within it, 0 for anything else - fractions, exponents, numbers beyond the range, and non-numbers.