foreach (1 .. @array) { if ($_%10 == 0) { print $array[$_-1]; } }