Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: 02.5 == 25 - WTF?

by Eily (Monsignor)
on Nov 30, 2020 at 23:13 UTC ( #11124425=note: print w/replies, xml ) Need Help??


in reply to 02.5 == 25 - WTF?

I expect that trying print 010.5, "\n", which prints 85 might be a clue about what's happening. It seems like octal representation is always interpreted as an int, so you have int(010).5. In which case the dot is the concatenation operator.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (9)
As of 2021-10-26 10:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (90 votes). Check out past polls.

    Notices?