On Thu, 8 Nov 2001, Dan Sugalski wrote:
> Yes, it is a bug. There's an array in list context--it's supposed to be
> flattened before the foreach loop gets evaluated. (And if there are
> multiple arrays in the list it works as you'd expect)
Sorry, I quoted the wrong section. It really isn't a bug - the next
paragraph in perlsyn explains:
If any part of LIST is an array, "foreach" will get very
confused if you add or remove elements within the loop
body, for example with "splice". So don't do that.
-sam