Re: RFC 132 (v1) subroutines should be able to return an lvalue

[email protected] ((Johan Vromans)) 18 Aug 2000 19:06:57 +0200
Newsgroups perl.perl6.language.subs
Message-ID <[email protected]>
Jonathan Scott Duff <[email protected]> writes:

> But why introduce a new keyword "lreturn"?  What about something like
> this?
> 
> 	sub foo {
> 	    my $lvalue : lvalue;
> 	    ...
> 	    return $lvalue if want('LVALUE');
> 	}

Because you cannot do this with

  my %hash;
  sub address {
    lreturn $hash{address};
  }

-- Johan