in reply to Re: Trying to learn about References
in thread Trying to learn about References
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (tilly) 3: Trying to learn about References
by tilly (Archbishop) on Jan 07, 2002 at 18:48 UTC |