Array::Split - split an array into sub-arrays
version 1.103261
use Array::Split qw( split_by split_into );
This module offers functions to separate all the elements of one array into multiple arrays.
Splits up the original array into sub-arrays containing the contents of the original. Each sub-array's size is the same or less than $split_size, with the last one usually being the one to have less if there are not enough elements in @original.
Splits the given array into even-sized (as even as maths allow) sub-arrays. It tries to create as many sub-arrays as $count indicates, but will return less if there are not enough elements in @original.
Returns a list of array references.
Christian Walde <mithaldu@yahoo.de>
This software is Copyright (c) 2010 by Christian Walde.
This is free software, licensed under:
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE, Version 2, December 2004
To install Array::Split, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Array::Split
CPAN shell
perl -MCPAN -e shell install Array::Split
For more information on module installation, please visit the detailed CPAN module installation guide.