in reply to fixed the problem
in thread fun(?) with +=
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
|
|---|