use strict; use warnings; my @orig = 1..17; my $arrs = 4; my @arrs; ##### And here we go: ##### push @{$arrs[$_ % $arrs]}, $orig[$_] for 0..$#orig; print join ' ', @$_, "\n" for @arrs;
In reply to Re: breaking an array into nearly equal parts
by TedPride
in thread breaking an array into nearly equal parts
by santonegro
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |