... } else { print join(',', @$included, $nextValue), "\n" if $currentGoal == $nextValue; return if $nextValue >= $currentGoal; } ...