NAME
Array::Dissect - Convert an array into N-sized array of arrays
SYNOPSIS
use Array::Dissect;
@sample = ( 1 .. 10 );
$rowsize = 3;
Array::Dissect->dissect( $rowsize, \@sample );
=>
(
[ 1, 5, 9 ],
[ 2, 6, 10 ],
[ 3, 7 ],
[ 4, 8 ]
);
DESCRIPTION
Like Array::Reform, this takes a big array, and converts it into an array of arrays. The key difference between the two modules is that this one takes elements from the start of the big array and pushes them onto each of the subarrays sequentially, rather than simply dividing the big array up into discrete chunks. The intended effect of this method is that, if fed a sorted array, dissect() returns an array of arrays where the first element of each subarray will be one of the highest (or lowest, depending on how the array is sorted) value items in the big array, and the last element of each will be the opposite.
AUTHOR
Alex Bowley <kilinrax@cpan.org>