On Wed, Mar 16, 2005 at 02:55:21PM -0600, Rod Adams wrote: : Of course, I now have to question the need for C<given>. Other than : linguistics, which is not to be dismissed, what difference is there between : : given $expr { ... } : : and : : for $expr { ... } : : with equivalent ...'s? : : hmm. Come to think of it, the C<for> would flatten $expr if it happened : to look like an array or something equally "bumpy", where C<given> would : not. But perhaps it would make sense to define C<for> and C<given> as : synonyms in all other ways but "autoflatten".
We considered this at one point, but in addition to the difference between list and scalar context, there's also the fact that the inside responds differently to "next" and "last". A "given" is officially NOT a loop, so "next" and "last" escape from it to whatever the outer loop is. Larry