SPUG: defaulting a value

Yitzchak Scott-Thoennes sthoenna at efn.org
Wed Oct 29 00:39:00 CST 2003


On Tue, Oct 28, 2003 at 09:52:08PM -0800, "Michael R. Wolf" <MichaelRWolf at att.net> wrote:
> Anyone remember the status of // as an or-ish operator? If's it's
> available pre-Perl6, then the following would be my suggestion for
> defaulting an undefined value, but preserving 0 (not necessary in this
> case, but is necessary in the general case):
> 
>     $debug //= 0;

//, //=, and err operators are in 5.9.0.  H.M.Brand has a patch to also
implement them for earlier perls (back to 5.8.0 maybe?) that he updates
for each new release.  The latest (for 5.8.2-RC1) is on CPAN at:
http://www.cpan.org/authors/id/H/HM/HMBRAND/dor-5.8.2-rc1.diff




More information about the spug-list mailing list