Identifiers are not allowed to start with digits, like it's not allowed to call a
sub 1586i { ... }
though it's possible to have a pure digit key (?)
DB<113> p $h{1586}++ 1 DB<114> p $h{1586}++ 2
strange ...
so I couldn't find it documented, but the rule seems to be:
In order to autoquote a hash key it has to be a legal identifier or a number.
in this case the number is found and Perl thinks an operator is missing to separate it from the bareword.
from perlglossary
identifierA legally formed name for most anything in which a computer program might be interested. Many languages (including Perl) allow identifiers to start with an alphabetic character, and then contain alphabetics and digits. Perl also allows connector punctuation like the underscore character wherever it allows alphabetics. (Perl also has more complicated names, like qualified names.)
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
In reply to Re^2: syntax error
by LanX
in thread syntax error
by bigup401
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |