my @LoL; while(my @items = splice( @list, 0, 2) ){ push @LoL, [@items]; }