in reply to what does this print?
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 :-)
|
|---|