in reply to issue with print/join 2 arrays

@array1 = (1, 2, 3, 1, 2, 3, 1, 2, 3 ); @array2 = (blue, white, yellow, blue, white, yellow, blue, white, yell +ow); while (@array1) { (@p1) = (shift(@array1), shift(@array1), shift(@array1)); (@p2) = (shift(@array2), shift(@array2), shift(@array2)); printf("%s %s %s %s %s %s\n", (@p1), (@p2)); }
the idea is to prepare print parameters in @p1 and @p2 before printing them... should be nicer with variables declarations and quotes around bare words (colors...) hope it helps