in reply to Re: 02.5 == 25 - WTF?
in thread 02.5 == 25 - WTF?

LOL, B::Deparse is normally the best way to show such precedence problems, but constant folding is hiding it! :)

D:\>perl -MO=Deparse -E"say 02.5" use feature 'current_sub', 'evalbytes', 'fc', 'postderef_qq', 'say', ' +state', 'switch', 'unicode_strings', 'unicode_eval'; say '25'; -e syntax OK

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^3: 02.5 == 25 - WTF?
by GrandFather (Saint) on Dec 01, 2020 at 00:43 UTC

    With hindsight, the fact that 25 is a quoted string is a hint.

    Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond