We don't bite newbies here... much | |
PerlMonks |
Re: Apocalypse 3by blakem (Monsignor) |
on Oct 04, 2001 at 02:14 UTC ( [id://116586]=note: print w/replies, xml ) | Need Help?? |
I grepped it for the forbidden information that put my life in jeopardy a few days ago:
A binary // operator is the defaulting operator. That is:
is short for:
except that the left side is evaluated only once. It will work on arrays and hashes as well as scalars. It also has a corresponding assignment operator, which only does the assignment if the left side is undefined: That's actually quite cool... currently when people use $a ||= b they often times really mean $a = defined ($a) ? $a : $b and now we'll have an easy way to do it..
-Blake
In Section
Meditations
|
|