```{index} single: isnum (Scalar::Util::Numeric) ``` ```{index} single: Scalar::Util::Numeric::isnum ``` # isnum Whether a value is a number, and which kind. ## Synopsis ```perl use Scalar::Util::Numeric qw(isnum); my $flags = isnum($v); ``` ## What you get back 0 when `$v` is not a number or is `undef`; otherwise the flags of perl's number parser: 0x01 fits an unsigned integer, 0x02 is larger, 0x04 has a fraction or exponent, 0x08 is negative, 0x10 is infinity, 0x20 is NaN. Leading and trailing whitespace is allowed, as perl allows it when it converts a string.