title: print element of an array by assigning to variables
body: <p>I am unable to print array element values as expected. <code>@array = (1,2,3,4,5,6,7,8);</code></p>
  
  <p>I want to assign first value to variable a and second to variable b</p>
  
  <pre><code>for (my $index = 0; $index &lt;= $# array; $index++) {
      my $a = @array[$index];
      my $b = @array[$index + 1];
      DEBUG("DEBUG:: $a and $b");
  }
  </code></pre>
  
  <p>I want output like</p>
  
  <pre><code>    a=1 and b=2
      a=3 and b=4
      a=5 and b=6
  </code></pre>