James Mastros wrote: > > Oh, here's an idea WRT extending the concept to cover both scalar and list > assignment: Have $^R be the return in scalar context, and @^R be the return > in list context. If @^R is unset, then a one-element list of $^R is returned. I don't like where this is leading. Currently perl does not allow modification of lists (vs. arrays). The operations supported for lists are a tiny subset of those supported for arrays: assignment-from, single-item index, and last-element-of. Simply setting up an array alias to a list won't magically give us all those array operations for the list. In order to C< push @^R >, there has to be a data structure there that supports the push operator. And if that is going to be the case, then I don't see the point in all this over having your own array variable and returning that when you're done. -- John Porter You can't keep Perl6 Perl5.
- Re: assign to magic name-of-function variable instead of &q... Branden
- Re: assign to magic name-of-function variable instead of &q... David L. Nicol
- Re: assign to magic name-of-function variable instead of &q... James Mastros
- Re: assign to magic name-of-function variable instead of &q... John Porter
- Re: assign to magic name-of-function variable instead of &q... David L. Nicol
- Re: assign to magic name-of-function variable instead of &q... abigail
- Re: assign to magic name-of-function variable instead of &q... James Mastros
- Re: assign to magic name-of-function variable instead ... David L. Nicol
- Re: assign to magic name-of-function variable instead of &q... Johan Vromans
- Re: assign to magic name-of-function variable instead of &q... James Mastros
- Re: assign to magic name-of-function variable instead of &q... Bart Lateur
- Re: assign to magic name-of-function variable instead of &q... Branden
- Re: assign to magic name-of-function variable instead of &q... Simon Cozens
- Re: assign to magic name-of-function variable instead of &q... John Porter
- Re: assign to magic name-of-function variable instead of &q... James Mastros
- Re: assign to magic name-of-function variable instead of &q... Simon Cozens
- Re: assign to magic name-of-function variable instead of &q... James Mastros