in reply to list to LoL
Ok, here is my code:
@A=(1,2,3,4,5,6,7,8,9); # some array $n = 3; # some n while( @B = splice @A, $i++, $n ) { @A= ( [@B], @A ) }; @A = reverse @A; # To put it back in the right order.
And yes, that blows away the old @A.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE:(2) list to LoL
by swiftone (Curate) on Jun 02, 2000 at 21:27 UTC |