Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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 about the Monastery: (12)
As of 2016-09-30 12:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (566 votes). Check out past polls.