Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: [SOLVED] How do I determine with a regular expression whether a scalar is a number/whole/integer/float?

by ikegami (Patriarch)
on Jul 14, 2015 at 17:00 UTC ( [id://1134763]=note: print w/replies, xml ) Need Help??


in reply to [SOLVED] How do I determine with a regular expression whether a scalar is a number/whole/integer/float?

You used elsif ($number =~ /^\d+\z/ ) {, but the perlfaq4 used the equivalent of if ($number =~ /^\d+\z/ ) {.
  • Comment on Re: [SOLVED] How do I determine with a regular expression whether a scalar is a number/whole/integer/float?
  • Select or Download Code

Log In?
Username:
Password:

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

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

    No recent polls found