Hmm. You'll have to try much harder to explain your point. I'm fully aware of the facts you repeat above, but I'm completely lost as to why you felt it an appropriate response to my node. I also disagree with your use of "wrongly" and "should". You also appear to disagree with your own uses of "wrongly" and "should" in other replies in these threads.
The rest of that (complex) sentence that you partially quoted includes:
if it's a bareword that would be a legal simple identifier
And 08 isn't a legal simple indentifier (and thus there is no "problem"). Nor is 08 a bareword (by either definition). And I know you know this because elsewhere you noted this (though your inclusion of "hyphen" in your explanation was erroneous).
| [reply] |
It is indeed confusing. Unless you read (and remember all) what is in separate parts of the docs, the statement I quoted looks as if the => operator will stringify its left hand argument, which it does ... sometimes and under strict conditions only. I find it surprising and having been bitten by it before, I always quote the left hand part of =>. It would be better --IMO-- if the docs would make a less broad statement in that respect.
CountZero A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
| [reply] [d/l] [select] |
foo::bar => baz
perl is expecting a TERM. Barewords can start terms (infix operators like the x tye mentions cannot - that's why infix operators can consist of letters, but prefix operators cannot), and that's why all barewords look like identifiers. Because only after tokenizing the bareword and looking at the next token, perl decides whether the bareword is an identifier (subroutine, filehandle), or a string. | [reply] [d/l] |
Perl doesn't know for the very good reasons you quote. But the (partial) sentence I quoted from the docs, gives the impression that the => operator somehow makes a string out of its left-hand argument, which it cannot do anymore as the "octal" error already occurred.
CountZero A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
| [reply] [d/l] |