http://www.perlmonks.org?node_id=456410


in reply to Handling both string and numeric comparisons

In the standard module Scalar::Util, there is a function looks_like_number EXPR with which you can check this. It'll return true if Perl thinks EXPR is a number.

Arjen