Hi, Try this,
use strict; use warnings; my %hash = ( 5.764 => 'a', 3.24 => 'b', 4.6 => 'c'); print "$_\t$hash{$_}\n" for reverse sort keys %hash; __END__ 5.764 a 4.6 c 3.24 b
You should view How (Not) To Ask A Question.
Regards,
Velusamy R.
In reply to Re: sorting a hash
by Samy_rio
in thread sorting a hash
by Lhamo_rin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |