Since what you wanted to do is a common need, future versions of perl are supposed to include a "defined-or" operator:
$x //= 1; # same as $x = $x // 1;
will be equivalent to
$x = defined $x ? $x : 1; # same as $x = 1 unless defined $x
In reply to Re: fixed the problem
by itub
in thread fun(?) with +=
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |