Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

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

by dsheroh (Prior)
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.

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?

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2018-06-19 20:38 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (114 votes). Check out past polls.