Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Is a integer or string.

by rovf (Priest)
on May 25, 2009 at 11:46 UTC ( [id://766019]=note: print w/replies, xml ) Need Help??


in reply to Is a integer or string.

Is there any way to differentiate between a string and integer or float for a perl scalar variable.

Is this adequate?

use Scalar::Util qw(looks_like_number);

-- 
Ronald Fischer <ynnor@mm.st>

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-03-29 15:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found