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

Re: ||= (poorly documented?)

by kcott (Abbot)
on Jul 09, 2012 at 06:02 UTC ( #980653=note: print w/ replies, xml ) Need Help??


in reply to ||= (poorly documented?)

In perlop - Assignment Operators, the example shown for += applies to all the op= operators. So,

$x ||= 2;

is equivalent to

$x = $x || 2;

-- Ken


Comment on Re: ||= (poorly documented?)
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2014-10-31 06:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (215 votes), past polls