my @array2_copy = @array2; foreach my $item1 (@array1) { foreach my $item2 (@array2_copy) { ... } }