in reply to Re^5: split an array in two
in thread split an array in two
sub _split{ @_ == 1 and $#_++; [@_[0..@_/2-1]], [@_[@_/2..@_-1]] } __STDOUT__ <><> <1><> <1><2> <1><2 3> <1 2><3 4> <1 2><3 4 5>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: split an array in two
by Roy Johnson (Monsignor) on Apr 28, 2005 at 16:03 UTC | |
by sh1tn (Priest) on Apr 28, 2005 at 16:21 UTC |