Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
There's more than one way to do things
 
PerlMonks  

Re: Revealing difference in interpretation of 'number' between Perl and $other_language

by moritz (Cardinal)
on Sep 17, 2008 at 10:19 UTC ( #711949=note: print w/ replies, xml ) Need Help??


in reply to Revealing difference in interpretation of 'number' between Perl and $other_language

The Perl thinking is that a number is what looks like a number to a human being.

No, the Perl thinking is that if something is used a number, it is a number. When you call $a + $b (and they are not objects that overload +) then they are used as numbers, independently of what they look like. If there is no number representation, a default (0) is used, and optionally a warning emitted.


Comment on Re: Revealing difference in interpretation of 'number' between Perl and $other_language
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2014-04-20 04:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls