In which case a word must be something other than a sequence of "word characters". Is word defined somewhere?
update: I'm guessing a word must begin with an alphabetic character or an underscore so that anything beginning with a digit is not a word.
update: Looking at perl source (toke.c) it appears that anything beginning with a digit is scanned as a number while anything starting with an underscore or alphabetic character other than 'v' or 'x' is scanned as... there are quite a few possibilities here, one of which is "a word before a => operator". There is some additional testing done for 'v' and 'x'. I don't follow it all, but suspect 'v' might be the start of a version string, handled somewhat differently, and 'x' followed by a digit might be a repeat operator, depending on context. Otherwise 'v' and 'x' are handled the same as all the other alphabetics.
In conclusion: it appears that a word is not any sequence of word characters, but only those that begin with underscore or an alphabetic character. Anything beginning with a digit is a number, not a word, and is not forced to be a string when on the left of '=>'.
In reply to Re^4: Illegal octal digit error
by ig
in thread Illegal octal digit error
by lakshmananindia
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |