Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: ||= (poorly documented?)

by kcott (Canon)
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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://980653]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2017-02-27 21:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (393 votes). Check out past polls.