use strict; my $initValue = 3; my $step = 3; my $numOfMembers = 25; my $str = ""; my $ix; for($ix = $initValue; $ix <= $initValue + $step * ($numOfMembers - 1); $ix += $step) { $str .= $str eq "" ? $ix : " $ix"; } ### TEST ### print "'$str'\n";