On Wed, Apr 02, 2008 at 10:03:57AM -0700, Larry Wall wrote:
> Yes, current STD has the inside of () and [] as <statementlist>,
> which throws away all but the last statement. Arguably [] at least
> should probably be <semilist> though, and maybe () too.
>
> my @x := [{1+1}; {2+2}]; @x is currently [4], should be [2,4]?
> my @x = ({1+1}; {2+2}); same deal?
So if the semicolon is replaced with a comma, like this,
my @x := [{1+1}, {2+2}];
the {} acts as a hash constructor, and @x is [{2 => undef}, {4 => undef}] ?
And similarly for
my @x := ({1+1}, {2+2});
?
If so, does that mean that [{1 + 1}] and [; {1 + 1}] differ?
And [; {1 + 1}] and [{1 + 1}; ] are identical?
Nicholas Clark