This is surprising given the description of '=>' in perlop:
The "=>" operator is a synonym for the comma, but forces any word (consisting entirely of word characters) to its left to be interpreted as a string (as of 5.001). This includes words that might otherwise be considered a constant or function call.
And perlre defines a word character (\w) as:
A "\w" matches a single alphanumeric character (an alphabetic character, or a decimal digit) or "_"
Yet any collection of word characters that can be interpreted as a numeric constant is, and the result stringified. This includes octal, hex and some scientific notation (without period: e.g. 12e3).
Am I misreading perlsyn or does it say that 07, 0666, 0x123 and 12e3 or even 08, 0abc or even 0xyz should all be forced to be interpreted as strings rather than being interpreted as numbers or compile time errors?
In reply to Re^2: Illegal octal digit error
by ig
in thread Illegal octal digit error
by lakshmananindia
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |