in reply to what does this print?
What did you expected? your code is equivalent to...
for (1..10) { unless ($first) { $last = $_; $first = $last; } } print "$first..$last\n"; [download]