foreach (@geteilt) { if ($a < @teil+1) {$a +=2} } print $geteilt[$a]." ";