Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
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 taking refuge in the Monastery: (2)
As of 2023-03-31 02:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (74 votes). Check out past polls.

    Notices?