Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
when i try to do print("0x30"+0); at home, perl says 1.5, while at work it says 48. i was using perl 5.6.0 in both cases and in both cases i was expecting to get 0. i tried it with perl 5.005_03 and the result was '1.5' again. print("030"+0); prints 30, not 24. with warnings on it even gives the 'non-numeric' warning, but then extrapolates it to number anyway. i even somehow can understand the 0x30 -> 48, but 0x30 -> 1.5 is far beyond my comprehension. print("0x37"+0,"\n"); gives the even more surprising result 1.71875.
can somebody shed some light?