Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

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

by dsheroh (Parson)
on Jul 09, 2012 at 09:15 UTC ( #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.

Comment on Re^3: ||= (poorly documented?)
Select or Download Code
Re^4: ||= (poorly documented?)
by frozenwithjoy (Curate) 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?

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (14)
As of 2014-10-24 15:02 GMT
Find Nodes?
    Voting Booth?

    For retirement, I am banking on:

    Results (132 votes), past polls