in reply to Re (tilly) 2: How to flatten an x-dimensional array?
in thread How to flatten an x-dimensional array?

I think you missed a reverse there:
push @_, @$last;
needs to be
push @_, reverse @$last;
since you are reversing the result. Trivial example: $last = [1,2,3,4,5] must flatten as 5, 4, 3, 2, 1 so it can be reversed in the final result to 1, 2, 3, 4, 5 again.

-- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.
Re (tilly) 4: How to flatten an x-dimensional array?
by tilly (Archbishop) on Mar 12, 2002 at 20:59 UTC
    Try running it. :-)