Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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 surveying the Monastery: (7)
As of 2014-12-25 14:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (160 votes), past polls