Here's the output:for (0..5) { print map("<@$_>", split_array_in_two(1..$_)), "\n"; }
One-element input is still duplicated. Don't use @_ as an index.<><> <1><1> <1><2> <1><2 3> <1 2><3 4> <1 2><3 4 5>
In reply to Re^5: split an array in two
by Roy Johnson
in thread split an array in two
by water
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |