in reply to sorting a hash
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: sorting a hash
by fishbot_v2 (Chaplain) on Feb 28, 2006 at 13:00 UTC |