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.
In reply to Re^9: can sub check context for lvalue vs rvalue context?
by BrowserUk
in thread can sub check context for lvalue vs rvalue context?
by perl-diddler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |