Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^3: &&= vivify keys?

by ikegami (Patriarch)
on Apr 18, 2012 at 21:16 UTC ( #965802=note: print w/replies, xml ) Need Help??


in reply to Re^2: &&= vivify keys?
in thread &&= vivify keys?

Actually, you're closer to the truth than Eliya is. The assignment is indeed conditional.

Aside from the syntax error from missing parens, the problems both yours and Eliya share are:

  • 1 is actually evaluated before anything else,
  • $x{a} is only evaluated once, and
  • $x{a} is (only) evaluated in lvalue context.

See Re^2: &&= vivify keys?.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2022-05-28 16:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (99 votes). Check out past polls.

    Notices?