Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^8: Pre vs Post Incrementing variables

by repellent (Priest)
on Sep 13, 2010 at 06:09 UTC ( [id://859941]=note: print w/replies, xml ) Need Help??


in reply to Re^7: Pre vs Post Incrementing variables
in thread Pre vs Post Incrementing variables

No, I made no implied justification thus far.

The root of my reply was merely to reveal my experimentation with assigning the return of (++$i) to some value (since I also ran into the same error message you got).

Then, I attempted to explain the snippet you posted so that others may find it helpful to see what's going on.

My opinion? Yeah, the lvalue stuff is confusing and I don't quite see its usefulness. I would expect the behavior the OP expected.

Replies are listed 'Best First'.
Re^9: Pre vs Post Incrementing variables
by BrowserUk (Patriarch) on Sep 13, 2010 at 06:23 UTC
    I made no implied justification

    Then I apologise for misunderstanding your point.

    When I said: "Mind you, it might make explaining this one a tad awkward :)", I meant explaining the logic behind it, rather than the implementations behaviour.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2026-02-15 10:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    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.