http://qs321.pair.com?node_id=516493

santonegro has asked for the wisdom of the Perl Monks concerning the following question:

I want to take an array consisting of X elements and break it into 3 equal sized arrays if possible. if this is not possible, then I want a few arrays with slightly more elements. here is a sample table:
number elements in array /3 %3 size of each array
6202,2,2
7213,2,2
8223,3,2
9303,3,3
10314,3,3
11324,4,3
12404,4,4
13415,4,4
14425,5,4
15505,5,5