Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

•Re: Sorting hash keys according to different criteria

by merlyn (Sage)
on Jun 24, 2003 at 15:58 UTC ( #268566=note: print w/replies, xml ) Need Help??


in reply to Sorting hash keys according to different criteria

If they are coming in in the order that you need them, consider Tie::IxHash to keep the hash keys in the order of assignment.

Or, just have an array with the 12 months in it, and use that rather than sorting the keys. Skip over the elements that don't exist.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

  • Comment on •Re: Sorting hash keys according to different criteria

Replies are listed 'Best First'.
Re: Sorting hash keys according to different criteria
by Bukowski (Deacon) on Jun 24, 2003 at 16:01 UTC
    That, will do nicely :) ++ and thanks!

    Bukowski - aka Dan (dcs@black.hole-in-the.net)
    "Coffee for the mind, Pizza for the body, Sushi for the soul" -Userfriendly

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2022-05-17 17:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (68 votes). Check out past polls.

    Notices?