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-funct... abigail
- Re: assign to magic name-of-funct... James Mastros
- Re: assign to magic name-of-funct... Branden
- a name for the currently executin... David L. Nicol
- Re: a name for the currently exec... Dan Sugalski
- Re: a name for the currently exec... David L. Nicol
- Re: a name for the currently exec... Peter Scott
- Re: a name for the currently exec... Dan Sugalski
- Re: a name for the currently exec... Nicholas Clark
- Re: assign to magic name-of-function ... James Mastros
- Re: assign to magic name-of-function varia... John Porter
- Re: assign to magic name-of-function variable instead ... John Porter
- Re: assign to magic name-of-function variable inst... David L. Nicol
- Re: assign to magic name-of-function variable ... James Mastros
- Re: assign to magic name-of-function varia... David L. Nicol
- Re: assign to magic name-of-function variable instead of &q... John Porter
- Re: assign to magic name-of-function variable instead of &q... abigail
- 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