@my_array = (0, 1, 2, 3); $my_sub_array_length = 2; # possible combinations are (0, 1), (0, 2), (0, 3), (1, 2), (1, 3), (2, 3)