There are several ways, for example Scalar::Util has looks_like_number(), or Regexp::Common's $RE{num}{real}. Alternatively, in your specific case, you might just see if treating it as a number evaluates to zero, and then do a string comparison... (the latter wouldn't work if you also have negative numbers, though)
In reply to Re^5: Keeping Unique Elements in Array!
by almut
in thread Keeping Unique Elements in Array!
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |