in reply to Re^2: Which is your favourite cmt-deserving Perl feature?
in thread Which is your favourite cmt-deserving Perl feature?
This is likely a good case to comment since when debugging having a reminder that defined false values may be overwritten.You're perfectly right. But, if one is aware of what he is doing ||= does its job most of the time. Of course we all will welcome //= to cover the remaining cases.
Occasionally I use ||= on purpose to overwrite a false value (with another "standardized" false value), e.g.:
(Most often this is not necessary either, and -as usual- there are other ways to do it...)$u ||= ''; # or $v ||= 0;
|
|---|