Hi I needed the help as how to sort descending in a hash
[%FOREACH keyValue = wordCount.nsort(wordCount.$keyValue)%] <tr bgcolor=[%BGCOLOR%]> <td>[% keyValue %]</td> <td>[% wordCount.$keyValue %]</td> </tr> [%END%] This is sorting in ASCENFDING order. I tried out giving - , NOT ASC everything.nothing working. Please suggest as how to sort this.. One more: I am processing the results from a JAVA appllication. It could also help if you know any collection wich willl preserve the order, like >From the DATABASE I am getting in descending order and storing in TreeMap and >then while printing that the descending order is not maintained. So my way is either i need to sort in the JAVA side or PERL side. I tried many collections arraylist,MAp,HashMap...Nothign working.... Thanks Anish