Just another Perl shrine | |
PerlMonks |
Re: Re: Trying to learn about Referencesby AidanLee (Chaplain) |
on Jan 04, 2002 at 22:19 UTC ( [id://136330]=note: print w/replies, xml ) | Need Help?? |
A warning to the reader -- what talexb has done using the ||= operator is valid and useful, but has a catch. It isn't truly a default-setting operator (see Perl 6's //= operator) but rather a "set me to the following value if my current value evaluates to false". Note that any time a false value is a valid value for your variable, using the ||= to set the default will fail to produce the desired results.
In Section
Meditations
|
|