Help for this page

Select Code to Download


  1. or download this
    my @AoA;
    for (0 .. $#list) {
        push @AoA, [] if $_ % $C == 0;
        push @{ $AoA[-1] }, $list[$_];
    }
    
  2. or download this
    my @AoA = [];
    
    ...
        push @AoA, [] if $C == @{ $AoA[-1] };
        push @{ $AoA[-1] }, $_;
    }