in reply to Re: Effecient shortcut for ?:
in thread Effecient shortcut for ?:

These two are not exactly the same... they will behave differently if $bar is defined but has a non-true value (like 0). That's because the || operator tests for truth, while the much-to-be-desired // operator (in Perl6) will test for defined-ness. So in Perl6, you could write it as:
$foo = $bar; $foo //= $default_for_foo;
or, I imagine, like this:
$foo = $bar // $default_for_foo;

-- Mike

--
just,my${.02}