in reply to Re: Sorting multi-hash values
in thread Sorting multi-hash values

How did you consider to use reverse instead of $b->[2] <=> $a->[2]?

Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!

Replies are listed 'Best First'.
Re^3: Sorting multi-hash values
by holli (Abbot) on Aug 22, 2007 at 18:35 UTC
    Because I'm stoned.


    holli, /regexed monk/
      Well, that at least explains something ;-)

      Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!

Re^3: Sorting multi-hash values
by moritz (Cardinal) on Aug 22, 2007 at 20:31 UTC

    Actually the 'reverse sort' combination is recognized by perl and optimized away for simple comparisons.

    Thus it's actually not a bad idea

Re^3: Sorting multi-hash values
by ikegami (Patriarch) on Aug 22, 2007 at 20:27 UTC
    Isn't reverse sort optimized to do both operations at once?