On Fri, 20 Sep 2002, Larry Wall wrote:
> On Fri, 20 Sep 2002, John Williams wrote:
> : On Fri, 20 Sep 2002, Larry Wall wrote:
> : >
> : > Yes, in fact any list forced into scalar context will make a ref in Perl 6:
> : >
> : >     $arrayref = (1,2,3);
> :
> : That would seem to obviate the need for brackets to define array
> : references.  Is there any case where [1,2,3] would be needed instead of
> : (1,2,3)?
>
> Sure, in a list context.  [1,2,3] is really short for scalar(1,2,3).

I was just thinking that  $((1,2,3))  is also the same as  [1,2,3],
and shorter than  scalar(1,2,3).

~ John Williams

Reply via email to