I have an array of arbitrary length. I want to get all possible sub-arrays of a certain length. For example,
@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)
A search of the site lead me to this module which looks like it might do what I want but the links therein to pod and other documentation seem to be no longer active.
Does anyone know of new links to the documentation for the module? or does anyone have any other suggestions for doing these combinatorics?