Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: ||= (poorly documented?)

by dsheroh (Monsignor)
on Jul 09, 2012 at 09:15 UTC ( [id://980676]=note: print w/replies, xml ) Need Help??


in reply to Re^2: ||= (poorly documented?)
in thread ||= (poorly documented?)

This actually is easily googleable... if you're deep enough into the Perl culture. Try searching for it under the name "orcish maneuver", which will explain not only what the operator is but also exactly how it's being used in this case. (Link is to duckduckgo's first result, which just happens to also be on PerlMonks.)

Also note that, because of the distinction between truthiness and definedness mentioned in previous replies, you're going to want to use //= instead of ||= in the vast majority of cases unless your code needs to support pre-5.10 versions of Perl.

Replies are listed 'Best First'.
Re^4: ||= (poorly documented?)
by frozenwithjoy (Priest) on Jul 09, 2012 at 09:46 UTC
    If you are "deep enough in the Perl culture" to know to google "orcish maneuver", you probably don't need to look it up. On the other hand, if all you know to google is "||=", you're screwed unless you think to try "double pipe equals".

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (4)
As of 2024-04-25 13:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found