Hi, I understand that, but in that case how would you run on this:
(*a,*b,*c)=(\1,\2,\3); for ($a,$b,$c) { $_++; print $_; } Merlin, The Mage On Tuesday 07 May 2002 08:46 am, Dave Mitchell wrote: > 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. -- Merlin, The Mage new camelot site: affiliates.camelot.co.pt - Directorio de affiliate programs