#Descending my $i = $#array1+1; #or # my $i = @array1; print $array1[$i] -$array2[$i],"\n" while $i--;