On Tue, May 07, 2002 at 10:00:02AM -0400, Merlin, The Mage wrote: > Hi all, > > This don't looks like a bug to me. > > Why, may you ask? > > It's simple. > > 1..10 is a list constructor, so, by itself returns a list, then in > > for (1..10) { $_++ }, > > $_ is a list element, and not a constant. > > on the other hand in > > for (1,2,3,4,5,6,7,8,9,10) { $_++ } > > each of the elements are directly and they are not list elements, but > constants.
I think most users would expect for (1..6) ... for (1..5,6) ... for (1,2,3,4,5,6) ... To all behave identically (with the expection of possible perfomance gains in the 1..6 case). It's certainly what I'd expect. Dave. -- Lady Nancy Astor: If you were my husband, I would flavour your coffee with poison. Churchill: Madam - if I were your husband, I would drink it.