Bart Grieten wyrze¼bi³(a):
> %hash = (
> Apples => 1,
> apples => 4,
> artichokes => 3,
> Beets => 9,
>);
> then it should be sorted and printed in this way:
> Beets 9
> apples 4
> artichokes 3
> Apples 1
using variable number of spaces make the whole thing very complicated.
yet. if the number of spaces should be the same, you simply:
for my $sKey (sort { $hash{$b} <=> $hash{$a} } keys %hash) {
printf("%s : %u\n", $sKey, $hash{$sKey});
}
depesz
--
*-----------------------------------------------------------------*
czaderskie dywaniki do ³azienki lub przed ³ó¿ko:
http://www.allegro.pl/show_user_auctions.php?uid=118670