Thanks all of you, particularly Schemer for a quick and straightforward answer, and Anonymous Monk for the explanation of why it might be a useful error message for someone coming from a shell scripting background.
I still think perhaps "something between foreach and a list which is not a variable" would be a better error message though. I saw this construct as foreach, followed by something that I know returns a list, keys(%hashname), where's the error? It's kind of counter-intuitive for me at least.
($_='kkvvttuubbooppuuiiffssqqffssmmiibbddllffss') =~y~b-v~a-z~s; print
In reply to Re: Re: Re: Missing $ on loop variable?
by Cody Pendant
in thread Missing $ on loop variable?
by Cody Pendant
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |