in reply to Re: Filling buckets
in thread Filling buckets

or for that matter then:
sub split_to_n { my @return = map [], 1..shift; { for(@return) { return @return unless @_; push @$_, shift } redo } }

-- Randal L. Schwartz, Perl hacker