Re: Using lists "containing" arrays as lvalues

2005-08-29 Thread Larry Wall
On Sat, Aug 27, 2005 at 08:19:00PM +0200, Ingo Blechschmidt wrote: : But there is a problem with the ordinary assignment form: : : ($head, @tail) = foo(); : : If the LHS is an ordinary list (i.e., if we don't use help from the : grammar/macros), then the @tail would get flattened before it re

Re: Using lists "containing" arrays as lvalues

2005-08-29 Thread TSa
HaloO, Ingo Blechschmidt wrote: But there is a problem with the ordinary assignment form: ($head, @tail) = foo(); If the LHS is an ordinary list (i.e., if we don't use help from the grammar/macros), What is a 'ordinary List' to you? I thought (,) constructs a Lazy list? then the @tail

Re: Using lists "containing" arrays as lvalues

2005-08-27 Thread Ingo Blechschmidt
Hi, Yuval Kogman wrote: > On Sat, Aug 27, 2005 at 19:16:55 +0200, Ingo Blechschmidt wrote: > >>my ($head, [EMAIL PROTECTED]) := foo(); > > if foo returns a list of scalars >=2 this is like parameter > unpacking: > > my ($head, [EMAIL PROTECTED]) = *foo(); [...] Right, but I wanted to d

Re: Using lists "containing" arrays as lvalues

2005-08-27 Thread Yuval Kogman
. ($a, $b, $c) = foo()), this post only speaks about > using lists containing @arrays as lvalues). BTW, for simplicities sake perhaps there is an MMD on &infix:<,>, one for lvalue context, the other for read only context? >discarding any additional arguments, i.e. assumin

Using lists "containing" arrays as lvalues

2005-08-27 Thread Ingo Blechschmidt
se binding's property that the LHS is a subroutine signature. (Note that I do not talk about the LHS being a list of scalars (e.g. ($a, $b, $c) = foo()), this post only speaks about using lists containing @arrays as lvalues). If we generally recommend this solution especially to