Help for this page

Select Code to Download


  1. or download this
    sub split_into {
       my $howmany = shift;
    ...
       unshift(@buckets, [ reverse splice(@from, 0, @from / $howmany--) ])
    + while $howmany;
       @buckets;
    }
    
  2. or download this
    sub split_into {
       my $howmany = shift;
    ...
          { [ reverse splice(@from, 0, @from / $_) ] } 
          reverse 1 .. $howmany;
    }