in reply to Re: Split a large array into 10 smaller arrays
in thread Split a large array into 10 smaller arrays

I just checked list utils, and searched cpan for a package for this sort of thing. I found Array::Split which does exactly what I did - only without chewing through the original with pop. Using this package:

#!/usr/bin/env perl use strict; use warnings; use Data::Printer; use Array::Split qw( split_into ); my @original = (1,2,3,4,5,6,7,8,9); my $numberofarrays = 2; my @arrayrefs = split_into($numberofarrays,@original);