This routine splits a list into more than one list.
my @arr = qw ( apples oranges bananas pears berries apricots );
my @arr_of_columns = split_list( \@arr, 2 );
['apples', 'bananas','berries', 'prunes']
If you want to pad the end of uneven arrays place the padding as the third argument
my $arr_of_arr = split_list( [ 1 .. 7 ], 3, undef );
A note of caution: The original array is left intact. If split_list is used on large arrays you could run out of memory before this task completes.
Update:Changed title to mention unmerge. Thanks, belg4mit