in reply to Re: Leading Zeros confound eval() ?
in thread Leading Zeros confound eval() ?

thank-you that explanation makes sense. Its a odd side-effect of eval, IMHO, but I see why it's working that way..

Voted you a ++

Replies are listed 'Best First'.
Re^3: Leading Zeros confound eval() ?
by Anonymous Monk on Jul 21, 2015 at 19:12 UTC

    BTW, official Perl documentation on this is here. Another difference is that underscores are not handled when strings are converted to numbers:

    $ perl -wMstrict -le 'print 0+ 1_234 ' 1234 $ perl -wMstrict -le 'print 0+"1_234"' Argument "1_234" isn't numeric in addition (+) at -e line 1. 1
      wow, I'm surprised by THAT also. Thanks again, very interesting results.