http://qs321.pair.com?node_id=1172751


in reply to Re^5: why are hex values not numbers?
in thread why are hex values not numbers?

A string containing just decimal digits, can only be a number.
You could just as easily say a string containing just octal, or binary or hexadecimal digits, can only be a number.

A decimal number might be a "leetspeak" word if you were wanting to be cryptic.

Perl determines from *context* if the user is trying to use a variable as a number or a string. If the user tries to perform addition on a string -- it tries to see if the string looks like a number and allows it if it does. But there is no reason it needs to be limited to decimal digits. This is even more evident if you consider octal digits as an example. Using a rule of 'leading 0' for octal or 'leading 0x' for hex seem fairly safe -- can you give an example where doing so would be a problem?

Come-on BuK, question the status quo! ;-)