in reply to Re: (jeffa) Re: Sorting Numbers
in thread Sorting Numbers

From the perspective of sheer laziness, would it work to replace the
"local ($a, $b) = @_"
with a
"local ($b, $a) = @_"
? Reversed sort order, no comprehension or re-writing required.

/s

Replies are listed 'Best First'.
Re: Re: Re: (jeffa) Re: Sorting Numbers
by pixel (Scribe) on Nov 06, 2001 at 13:56 UTC

    Except of course $a and $b aren't actually passed into the sort function like that. Which is presumeably why that line is commented out :-)

    Blessed Be
    The Pixel

      Argh, how disgusting. But this should probably do the trick:
      local ($a, $b) = ($b, $a)