in reply to foreach over empty list

The first set of parens are a required part of the for/foreach syntax, not an empty list. Put an empty list inside them and all is well:

c:\test\xx>perl -we"for () { print; }" syntax error at -e line 1, near "() " Execution of -e aborted due to compilation errors. c:\test\xx>perl -we"for (()) { print; }"

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.