|
|
| There's more than one way to do things | |
| PerlMonks |
Re: can sub check context for lvalue vs rvalue context?by Anonymous Monk |
| on May 11, 2018 at 18:36 UTC ( [id://1214394]=note: print w/replies, xml ) | Need Help?? |
|
There does not seem to be a meaningful distinction in Perl. The return value is not intimately connected to the following assignment. Consider this snippet:
As you can see, $foo is passed around (by reference), but there is no telling if and where it is going to be assigned.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||