sub fancy_splice { my ($amount, @in_list) = @_; my $list; while (@in_list) { push @$list,[splice(@in_list,0,$amount)]; } return $list; }