On Wed, Mar 09, 2005 at 12:22:37PM +0100, Juerd wrote: : > my $a = [EMAIL PROTECTED]; : > my $a = *(1,2,3); # or is this a syntax error? : > my $a = *(list 1,2,3); : > my $a = *[1,2,3]; : : I hope this will emit some kind of too-many-arguments warning in : addition to assigning 1 to $a.
Nope, list assignment works just like in Perl 5. The motivation for that in Perl 5 is that returned list values are treated as extensible, and you don't want to break code when the module decides to return a little more information. Think of how caller() has been extended over the years. I'd like to keep that extensibility in Perl 6. However, you can always get stricter argument counting by using binding instead of list assignment, just like with regular parameter binding for function calls. Hmm, next thing you know, someone's going to suggest applying MMD to the left side of a binding. Ow. Larry