@nums = (456,657,787,455);

for $i (0..$#nums-1) {
print $nums[$i] - $nums[++$i];
}