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

Re: Test for number or string

by broquaint (Abbot)
on May 03, 2003 at 02:19 UTC ( [id://255235]=note: print w/replies, xml ) Need Help??


in reply to Test for number or string

There is always merlyn's classic example
sub is_numeric { ($_[0] & ~ $_[0]) eq "0"; }
And then there's the Inline::C method for testing a scalar Does it look like a number?.
HTH

_________
broquaint

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-04-19 22:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found