Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: sort a hash with split values

by shmem (Chancellor)
on Jun 21, 2006 at 18:30 UTC ( [id://556747]=note: print w/replies, xml ) Need Help??


in reply to Re^2: sort a hash with split values
in thread sort a hash with split values

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^4: sort a hash with split values
by sulfericacid (Deacon) on Jun 21, 2006 at 18:38 UTC
    Perhaps that was a little harsh, the OP said they did not understand it and was trying to get it to work. And you mocked the followup response in the chatterbox.

    For those reasons I had to downvote you. We should be a little more supportive to the little people :)

    Back to the OP, all you need to change is

    map { [ $_, (split/:/,$hash{$_})[1] ] }
    to
    map { [ $_, (split/:/,$hash{$_})[2] ] }


    "Age is nothing more than an inaccurate number bestowed upon us at birth as just another means for others to judge and classify us"

    sulfericacid
    A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

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

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

    No recent polls found