Liz, you're not quite correct about this I'm afraid. check this out:

    timo@schmand ~> perl6 -e 'my $lastval = 4; sub lastval is rw {
$lastval }; dd $lastval; lastval() = 5; dd $lastval'
    Int $lastval = 4
    Int $lastval = 5

The problem was that "return" was used. If you use "return-rw" or just
"last-value-of-block" returning, it'll work as expected.

The problem was that "return" behaves as if it were "return-ro".

cheers
  - Timo

Reply via email to