for(my $i = 0; ; $i++) { my $v = $begin + $step * $i; last if $v > $end; print "$v\n"; }