I had the following piece of code
I was supposed that this would act as a no-op - looping over an empty list and doing nothing - and was only meant as a placeholder where I wanted to put in the "real meat" later. To my surprise, this didn't compile: syntax error ... near "()"foreach () {}
Why does it reject my empty list? I re-read perlsyn, but didn't find anything which would forbid such a construct.
In reply to foreach over empty list by rovf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |