title: How do I read two items at a time in a Perl foreach loop?
body: <p>What I'm looking for is something like:</p>
  
  <pre><code>@list = qw(1 2 3 4 5 6);
  foreach (@list) {
    #perl magic goes here 
    print "i: $i, j:$j\n";
  }
  </code></pre>
  
  <p>returns:</p>
  
  <pre><code>i:1, j:2
  i:3, j:4
  i:5, j:6
  </code></pre>
  
  <p>In response to a very good suggestion below, I need to specify that this script will run on someone else's build server, and I'm not allowed to use any modules from CPAN.  Standard Perl only.</p>