How do I determine whether a scalar is a number/whole/integer/float?Assuming that you don't care about IEEE notations like "NaN" or "Infinity", you probably just want to use a regular expression.
... if (/^-?\d+$/) { print "is an integer\n" } if (/^[+-]?\d+$/) { print "is a +/- integer\n" } ...
In reply to Re: Integer detection concept
by mothra
in thread Integer detection concept
by boo_radley
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |