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

Re: Not a Number

by George_Sherston (Vicar)
on Oct 18, 2002 at 10:48 UTC ( #206259=note: print w/replies, xml ) Need Help??


in reply to Not a Number

This question seems to come round with the fall of the leaf. When I asked it last year I didn't realise that it was so interesting and complex. Now I know, though I admit part of me just wants to say, like Sir Roger de Coverley would if he'd had a Babbage Engine, "well come on, I mean to say dash it all, a thing's either a number or it's not, don't you know?"

George Sherston

Replies are listed 'Best First'.
Re: Re: Not a Number
by broquaint (Abbot) on Oct 18, 2002 at 11:17 UTC
    It may be a little late now but here's a funky little subroutine from merlyn that distinguishes between numbers and strings
    sub is_numeric { ($_[0] & ~ $_[0]) eq "0"; }
    The original post can be found here.
    HTH

    _________
    broquaint

      OK, what will your subroutine return for '1e+2'?..
      perltod() works fine.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://206259]
help
Chatterbox?
[marto]: hey Corion, how's tricks?
[Corion]: marto: Currently all well - work is even OK currently ;) I should start translating my WWW::Mechanize:: Chrome talk to English and recheck that my demos all work, but I have two weeks for that still :)
[Corion]: So, most things are looking good :-D
[Corion]: I should write some more code for my Jekyll clone, but I don't feel like it, so maybe I should just let that linger instead ;)
[karlgoethebier]: "...mein enemy..."

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2017-07-26 10:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (390 votes). Check out past polls.