On Tue, 2004-03-23 at 13:11, Goplat wrote: > @(...) is the "list context" operator in S3. I hope array references won't > explode in list context, that would be very annoying when making > multi-dimentional arrays: > > @foo = ([1, 2], [3, 4]) # oops, would be (1, 2, 3, 4) > @foo = ($([1, 2]), $([3, 4])) # ugh :(
I would expect [] to force itself into scalar context anyway. Is there ever a reason to want otherwise? Clearly the entire point of [] is to create a scalar array ref from a list of arguments. More to the point is there ever a reason to want any array ref in list context to NOT explode other than []? I can't think of any. push @a, $b Is it too non-obvious that if $b is an array ref, then this is going to extend @a by $b.length elements? Pardon my ignorance, but I thought this was the plan. Feel free to correct me if I am wrong. -- Aaron Sherman <[EMAIL PROTECTED]> Senior Systems Engineer and Toolsmith "It's the sound of a satellite saying, 'get me down!'" -Shriekback
signature.asc
Description: This is a digitally signed message part