You can do it like this:
@items = qw(a b c d e f g h i j k l m n o p q r s t u v w x y z); @sortedItems = sort{$b <=> $a}@items; #reverse the sort print "@sortedItems"; When you use the <=> operator, you can specify the direction by where you put the $a and $b variables. -----Original Message----- From: Barry Jones [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 21, 2002 11:23 AM To: [EMAIL PROTECTED] Subject: Reverse sort? How can I sort a hash's keys in reverse order? Barry Jones DATABUILT, Inc. The Global AEC Information Company 1476 Fording Island Rd. Bluffton, SC 29910 (843) 836-2166 office "Life is like a dogsled team; if you ain't the lead dog, the scenery never changes." - Lewis Grizzard -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]