in reply to Re: Filling bucketsin thread Filling buckets
sub split_to_n { my @return = map [], 1..shift; { for(@return) { return @return unless @_; push @$_, shift } redo } } [download]
-- Randal L. Schwartz, Perl hacker