Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: sorting hashes

by davido (Cardinal)
on Mar 24, 2009 at 20:21 UTC ( [id://752960]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my %hash;
    @hash{ qw/number score alignment/ } = @cols;
    
  2. or download this
    my %hash;
    @hash{ qw/number score alignment/ } = map{ \$cols[$_] } 0 .. $#cols;
    
  3. or download this
    my %hash = (
        number    => '$cols[0]',
        scorecons => '$cols[1]'
        alignment => '$cols[2]'
    );
    
  4. or download this
    @cols = ( [ qw/value1 number   / ],
              [ qw/value2 scorecons/ ],
              [ qw/value3 alignment/ ]
    );
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-04-19 22:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found