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