use strict; use warnings; my %hash = ( 23=> "er",3.5 =>"rt", 56=>"ssd",7=>"ert"); print "$_:-:$hash{$_}\n" for sort {$b <=> $a} keys %hash;