Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: is_numeric

by GrandFather (Saint)
on Apr 11, 2007 at 21:25 UTC ( [id://609495]=note: print w/replies, xml ) Need Help??


in reply to Re: is_numeric
in thread is_numeric

return eval { ! ref $x and $x == $x };

is a light weight way to fix that case.


DWIM is Perl's answer to Gödel

Replies are listed 'Best First'.
Re^3: is_numeric
by ikegami (Patriarch) on Apr 12, 2007 at 01:37 UTC
    But if you do that, objects that overload numerification to return a number won't be considered numbers...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2025-11-12 12:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (68 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.