for (grep { not $_ % 2 } 0 .. $#params) { my ($parameter, $spec) = @params[$_, $_+1]; ... }