in reply to split an array in two
sub split_array_in_two { ([@_[0..$#_/2]], [@_[$#_/2+1..$#_]]); } for (0..5) { print map("<@$_>", split_array_in_two(1..$_)), "\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: split an array in two
by Anonymous Monk on Apr 28, 2005 at 14:43 UTC | |
by Roy Johnson (Monsignor) on Apr 28, 2005 at 14:50 UTC | |
by sh1tn (Priest) on Apr 28, 2005 at 15:14 UTC | |
by Roy Johnson (Monsignor) on Apr 28, 2005 at 15:20 UTC | |
by sh1tn (Priest) on Apr 28, 2005 at 15:41 UTC | |
|