A binary // operator is the defaulting operator.Perl 6 should be such fun!
That is:is short for:$a // $bexcept that the left side is evaluated only once. It will work on arrays and hashes as well as scalars. It also has a corresponding assignment operator, which only does the assignment if the left side is undefined:defined($a) ?? $a :: $b$pi //= 3;
In reply to Re: How to deal with undefined returned variables.
by Russ
in thread How to deal with undefined returned variables.
by Pug
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |