Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: 02.5 == 25 - WTF?

by Eily (Monsignor)
on Nov 30, 2020 at 23:13 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-04-23 23:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found