> [RT_System - Mon Sep 20 02:46:44 1999]:
> 
> >Ah, I think I see what you mean now.  You want these to behave
differently:
> >
> >  DB<1> print $count = @array = ((undef) x 3)[0,1,2]
> >0
> >  DB<2> print $count = @array = ()[0,1,2]           
> >0
> >
> >You'd have the first version start returning three, but leave the second
> >version alone.  The potential for breakage here is certainly reduced
> >compared to what I misunderstood the original request to be, since there
> >are fewer cases that would change.  And it's quite possible that it's
> >the latter case that people rely upon more than it is the former one.
> >Whether it's exclusively the latter case that matters, I wonder.  But you
> >can't know what color the yolk is until you break the egg.
> 
> Omlette makers can sometimes tell without breaking anything. :-)

And they do behave differently.

0 ~/tmp$ perl -le 'print $count = @array = ((undef) x 3)[0,1,2]'
3
0 ~/tmp$ perl -le 'print $count = @array = ()[0,1,2]'
0

So I guess whatever this was about its been resolved.

Reply via email to