http://www.perlmonks.org?node_id=176009


in reply to Re^2: Schwartzian Transform and memory allocation.
in thread Schwartzian Transform and memory allocation.

I think the

sort { $a->[$variable-1] cmp $b->[$variable-1] },

line should be

sort { $a->[$variable] cmp $b->[$variable] },

The -1 was added by abigail to skip over the $_ that was tacked on at the beginning of the anon array. You're no longer doing that.

--

flounder

Replies are listed 'Best First'.
Re^4: Schwartzian Transform and memory allocation.
by Aristotle (Chancellor) on Jun 20, 2002 at 22:53 UTC
    No, actually, Abigail added the -1 because there was no longer an extra element to skip over. It doesn't make sense to subtract 1 to skip over an extra element, does it? The same premise holds true in my snippet as well.

    Makeshifts last the longest.