My apologies,
I miscopied the code, it should have been:
foreach (reverse sort keys %myhash) {
print "$_ : $myhash{$_}\n";
}
-----Original Message-----
From: Mark Anderson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 11:38 AM
To: [EMAIL PROTECTED]
Subject: RE: Reverse sort?
More readable/maintainable is:
@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 = reverse sort @items; #reverse sort the array
print "@sortedItems";
Which gives the following as the answer:
foreach reverse sort keys %myhash {
print "$_ : $myhash{$_}\n";
}
/\/\ark
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]