We don't bite newbies here... much | |
PerlMonks |
Re^2: why are hex values not numbers?by Eily (Monsignor) |
on Sep 27, 2016 at 17:11 UTC ( [id://1172768]=note: print w/replies, xml ) | Need Help?? |
Following my last edit, I realized there's a good reason why using a string as a number is not always the same as simply removing the quotes. It's so that if you ask for user input, the user can type "042", or select this value in a form that pads its numbers with 0, and you'll still get the value the user meant to send rather than 34. I guess having "042" != 042 for this reason but "0x16" == 0x16 is more surprising than only having decimal numbers work this way.
In Section
Seekers of Perl Wisdom
|
|