It doesn’t “abort” the assignment – the logical OR is evaluated first, then possibly the last, and if that is evaluated, it prevents the assignment from evaluating at all. And thus it works.
Makeshifts last the longest.
In reply to Re^2: Shortcut operator for $a->{'b'}=$b if $b;
by Aristotle
in thread Shortcut operator for $a->{'b'}=$b if $b;
by rokadave
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |