my( $log, $semRef, $from, $step, $to ) = @_; for (my $file = $from ; $file <= $to ; $file += $step) { ...... } ;