Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Re: Is it a number?

by broquaint (Abbot)
on Nov 12, 2002 at 00:19 UTC ( [id://212159]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub is_numeric {
      ($_[0] & ~ $_[0]) eq "0";
    }
    
  2. or download this
    print +(isnum($_) ? "is a number" : "not a number"), ": $_", $/
      for qw( 1 2.2 3e3 4. .5);
    ...
    is a number: 3e3
    is a number: 4.
    is a number: .5
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-09-12 03:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (15 votes). Check out past polls.

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.