Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Handling both string and numeric comparisons

by Aragorn (Curate)
on May 12, 2005 at 14:44 UTC ( #456410=note: print w/ replies, xml ) Need Help??


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


Comment on Re: Handling both string and numeric comparisons
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://456410]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (11)
As of 2015-07-30 09:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (270 votes), past polls