my $counter:loopcounter; # automatically used for all loops in the innermost scope print "$_ at index $counter\n" for @x; print "$_\n" for @y; print "\@x and \@y had $counter total elements\n";