in reply to how do i sort hash values?

Not easy to figure out exactly what you need, so apologies if I am incorrect.
First, I am uncertain why you require a hash, after all you cannot sort a hash, and it has no order.
The easiest way to get a unique number for each character is to use ord().
my @array = split '', $string; @hash{@array} = map {ord} @array;

If you then want to list the key/value pairs, use a 'for' loop with reverse() and sort(). As stated above, it would be best if you looked these up yourself, but to get you started:
for my $key (reverse sort keys %hash) { print "$key: $hash{$key}\n" }

Replies are listed 'Best First'.
Re^2: how do i sort hash values?
by Anonymous Monk on Oct 09, 2006 at 11:17 UTC
    hi, thanks ya, its working.