in reply to breaking an array into nearly equal parts

Another interesting way to do it:
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;