You're looking at $first ||= $last = $_; and mentally comparing it to $first = $last = $_;
The problem is: you should compare it to $first = $first || ($last = $_)
Being a short-circuit operator, ||= doesn't get it's right-hand side to be evaluated unless necessary :-)
In reply to Re: what does this print?
by cog
in thread what does this print?
by fergal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |