Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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 perusing the Monastery: (4)
As of 2021-09-19 12:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?