if ($array[0] eq (0+$array[0])) { # certainly IS a number } else { # might be a "string" number: # might contain extra space, or plus sign, # or extra zeroes, ... # Add more checking here if you need. }
In reply to Re: Is Array Element Numeric? (was I wonder...)
by fglock
in thread Is Array Element Numeric? (was I wonder...)
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |