Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: sorting a hash

by ashokpj (Hermit)
on Feb 28, 2006 at 14:50 UTC ( [id://533358]=note: print w/replies, xml ) Need Help??


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

    http://www.perlfect.com/articles/sorting.shtml

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://533358]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-04-26 09:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found