my $increment = ($second - $first) / ($steps - 1); ... push @array, $first += $increment;