📅  最后修改于: 2022-03-11 14:48:10.930000             🧑  作者: Mango
my @array = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
my $numberofarrays = 10;
my @splitArray;
while (@array) {
foreach (0..$numberofarrays-1){
if (@array) {
push @{$splitArray[$_]}, shift @arrays;
}
}
}