for (my $i=0; $i < @start_incline; $i++) { if ($start_incline[$i] == $sorted_nums[0]) { @incline = @start_incline [$i+1 .. $#start_incline]; } }