in reply to Re: sort hash elements...
in thread sort hash elements...

Hi chady, Thanks for helping :)

I tried out your pieces of code. The first one does not sort the results in descending order (I forgot to mention the descending order bit) and the second one doesn't work - there is an error somewhere but I can't figure out what it was.

Any advice?

Replies are listed 'Best First'.
Re: Re: Re: sort hash elements...
by Chady (Priest) on Mar 27, 2002 at 18:01 UTC

    to sort in descending order, just reverse $a and $b.. and as for the second code.. I fixed it up, there was a missing parens.. sorry.


    He who asks will be a fool for five minutes, but he who doesn't ask will remain a fool for life.

    Chady | http://chady.net/