in reply to Re^4: Keeping Unique Elements in Array!
in thread Keeping Unique Elements in Array!

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)