foreach my $foo (@bar) count $c { print $c . "-> " . $foo; } #### foreach my $foo (@bar) counting $c { print $c . "-> " . $foo; }