in reply to Re: List into two-dimensional array
in thread List into two-dimensional array
sub group { my $n = shift; my @rv; push @rv, splice(@_, 0, $n) while @_; return @rv; }
That just returns a copy of the original list. You probably meant push @rv, [ splice(@_, 0, $n) ] while @_;.
|
|---|