What I'm wondering is if the sub is an 'lvalue' sub, can I return something different at the end based on whether or not the sub is called in an lvalue-wanting context vs. an rvalue-wanting context?
I.e. is there something like wantlvalue that would return '1' if sub is called in an lvalue context, '0' if in an 'rvalue' context, or 'undef' if called in a null context?
Tnx!
In reply to can sub check context for lvalue vs rvalue context? by perl-diddler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |