Help for this page

Select Code to Download


  1. or download this
    print "$_->[0] - $_->[1]\n" for @LoL;
    
  2. or download this
    my @LoL;
    while(my @items = splice( @list, 0, 2) ){
       push @LoL, [@items];
    }
    
  3. or download this
    my $size = 2;
    die "Uneven list" if @list % $size;
    ...
      my $rem = $index % $size;
      $LoL[($index - $rem)/$size]->[$rem] = $list[$index];
    }