Welcome to the Monastery | |
PerlMonks |
Re: 02.5 == 25 - WTF?by syphilis (Archbishop) |
on Nov 30, 2020 at 23:11 UTC ( [id://11124424]=note: print w/replies, xml ) | Need Help?? |
But that doesn't account for 02.5 == 25 or 02.9 == 29 does it? Aaah ... but it's not claiming that. It's claiming that 02 . 5 eq '25' and 02 . 9 eq '29'. I think it's just that perl doesn't do octal fractional values. So the "." is considered to be the concatenation operator rather than the radix point. As to whether you should be surprised ... I'm inclined to say "yes" ... but I haven't given it a lot of thought. UPDATE: Perl does the same thing with hex values: Cheers, Rob
In Section
Seekers of Perl Wisdom
|
|