At 05:41 PM 11/8/2001 -0500, Sam Tregar wrote:
>On Thu, 8 Nov 2001, Dan Sugalski wrote:
>
> > Gack. Looks like a mis-placed optimization in perl 5. The list of a foreach
> > is *supposed* to flatten at loop start and be static. Apparently not. :)
> >
> > Care to file the perl 5 bug report, or shall I?
>
>It's not a bug.
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)
Try the code and see what it does. It ought to iterate exactly once, but it
doesn't...
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk