Your code needs some TLC and your for (0 .. $#list) should probably be for (;;) loops.
Why? Do you believe the list gets flattened? No, for (EXPR..EXPR) is implemented as a counting loop.
In reply to Re^3: Challenge: Sorting Sums Of Sorted Series
by ikegami
in thread Challenge: Sorting Sums Of Sorted Series
by Limbic~Region
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |