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

Re: Valid Numbers or decimals

by Nevtlathiel (Friar)
on May 06, 2005 at 10:49 UTC ( [id://454643]=note: print w/replies, xml ) Need Help??


in reply to Valid Numbers or decimals

Just use a regular expression to check that your variable only contains a decimal place (\. - you need to escape it in the regular expression) and \d (digits 0-9). :)
----------
My cow-orkers were talking in punctuation the other day. What disturbed me most was that I understood it.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (7)
As of 2024-03-28 08:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found