in reply to Filling buckets

You know, I realized today that you never said anything about order.

So deal.

sub split_to_n { my @buckets = map {[]} 1..shift; while (@_) { my $b = shift @buckets; push @$b, shift; push @buckets, $b; } @buckets; }

Replies are listed 'Best First'.
Re: Re: Filling buckets
by merlyn (Sage) on Jan 04, 2001 at 06:17 UTC