my @foo = qw (one two three four five six seven eight nine ten); while ($c <$#foo){ ($s,$a)= @foo[$c++ .. ++$c+1]; print "$s $a\n"; }