if($lowrange % 2 == 0) { $lowrange++; } # could be $lowrange++ unless ($lowrange % 2);