title: How to go through odd index of an array using foreach loop?
body: <p>I want to access <code>$Array[$i]</code> and <code>$Array[$i+1]</code> in every iteration of <code>foreach</code> loop , I think I need to do this</p>
  
  <pre><code>$index = 0;
  foreach $element (@Array)
  {
    // access $element
    // access $Array[$index+1] 
  
    $index++;
  }
  </code></pre>
  
  <p>but if I do in this way , the <code>i+1</code> iteration will go through again, But if I want to let the loop go through i , i+2 , i+4 , i+6 ... How can I do?</p>
  
  <p>thanks</p>