M. J. T. Guy [Sun, 9 Aug 1998 15:51:48 +0000 (16:51 +0100)]
Message-Id: <E0z5Wp2-00071p-00@taurus.cus.cam.ac.uk>
p4raw-id: //depot/maint-5.005/perl@1792
print $key, '=', $ENV{$key}, "\n";
}
-To sort an array by value, you'll need to use a C<sort()> function.
+To sort a hash by value, you'll need to use a C<sort()> function.
Here's a descending numeric sort of a hash by its values:
foreach $key (sort { $hash{$b} <=> $hash{$a} } keys %hash) {