Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^4: can sub check context for lvalue vs rvalue context?

by haukex (Archbishop)
on May 10, 2018 at 11:20 UTC ( [id://1214316]=note: print w/replies, xml ) Need Help??


in reply to Re^3: can sub check context for lvalue vs rvalue context?
in thread can sub check context for lvalue vs rvalue context?

That implies it has a secondary context. It doesn't.

Yes, of course - I was a little sloppy with my language.

And what's being assigned to @x is not the return value of x(), but the return value of the assignment operation, which is an lvalue itself.
What is assigned to @x, is the result of the rvalue expression. And that, is the result of the assignment to lvalue returned by the subroutine.

Yes, I think we're both saying the same thing here.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1214316]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2025-11-18 17:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (72 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.