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

                my ($head, [EMAIL PROTECTED]) = *foo();

        if foo returns a scalar and an array as a list of two scalars,
        the second one being a ref to an array:

                my ($head, @tail) = foo();

>    I.e. we use 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).

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. assuming
>        my ($foo, $bar, [EMAIL PROTECTED]) := foo();
for this I think we need an easier solution... Perhaps flattenning
foo instead of adding a slurp, or making yadda yadda in lvalue throw
it's arguments away silently:

                my ($foo, $bar, ...) := foo();

 ()  Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418  perl hacker &

Attachment: pgpfVkAEM6Cwm.pgp
Description: PGP signature

Reply via email to