in reply to Re^8: can sub check context for lvalue vs rvalue context?
in thread can sub check context for lvalue vs rvalue context?
I don't need to return a constant
You miss the point entirely. (I beginning to wonder if it is deliberate.)
If you return anything that is not an lvalue, it is a constant. The very definition of rvalue, is "unassignable". Perl won't let you do that.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^10: can sub check context for lvalue vs rvalue context?
by perl-diddler (Chaplain) on May 11, 2018 at 16:19 UTC | |
by BrowserUk (Patriarch) on May 12, 2018 at 07:44 UTC | |
by perl-diddler (Chaplain) on May 14, 2018 at 03:59 UTC | |
by BrowserUk (Patriarch) on May 14, 2018 at 14:16 UTC | |
by LanX (Saint) on May 11, 2018 at 17:02 UTC | |
by perl-diddler (Chaplain) on May 14, 2018 at 03:53 UTC |