#!perl -w use strict; my $x=1; my $y=2; my @a=qw(1 2 3); my @b=qw(7 8 9); for my $pos(0..2) { print "$x:$a[$pos] $y:$b[$pos]\n"; }