Just by the way...
Now, that's cool; OTOH we have lvalue-able subs, but what about them?Huh, no, it's just a plain old SCALAR.$ perl -le 'my $u; sub u :lvalue {$u} print ref \u' SCALAR
You didn't print a reference to the lvalue sub u(). If you had, you would have gotten CODE.
You printed a reference to the return value of a call to u(). That's the same thing as a reference to $u itself.$ perl -le 'my $u; sub u :lvalue {$u} print ref \&u' CODE
$ perl -le 'my $u; sub u :lvalue {$u} print ref \u; print \u; print \$ +u' SCALAR SCALAR(0x812dd80) SCALAR(0x812dd80)
Update: On second reading, I guess maybe I missed your point. Nevermind me. Move along.
-sauoq "My two cents aren't worth a dime.";
In reply to Re: lvalues and action at distance
by sauoq
in thread lvalues and action at distance
by blazar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |