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 reply to Re: Re: Trying to learn about References
by AidanLee
in thread Trying to learn about References
by dru145
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |