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
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(); if foo returns a scalar and an