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