sub split_array_in_two { ([@_[0..$#_/2]], [@_[$#_/2+1..$#_]]); } for (0..5) { print map("<@$_>", split_array_in_two(1..$_)), "\n"; }
In reply to Re: split an array in two
by Roy Johnson
in thread split an array in two
by water
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |