in reply to sorting a hash

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

To learn more about sorting go through following site