Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Which module for maintaining hash insertion order?

by CoVAX (Beadle)
on Feb 16, 2015 at 17:29 UTC ( [id://1116905]=perlquestion: print w/replies, xml ) Need Help??

CoVAX has asked for the wisdom of the Perl Monks concerning the following question:

Which Perl module is recommended for maintaining insertion order with a hash?

The application I'm working on requires about 800-to-1,200 records (as hashes themselves) acquired from disparate sources to be stored in a hash (for fast searching by key) in a certain order (e.g., chronological or sequential).

I'm developing with ActivePerl 5.18.4 built for MSWin32-x86-multi-thread-64int although the code will also be running on CentOS 6 (64-bit) also.

I've already looked in Perl's /lib and /site/lib for a standard ("comes with" Perl) module (no joy; /site/lib is empty and /lib had Hash::Util, which does not offer what I need).

I also searched CPAN, but there were so many to choose from I thought it better to ask here for guidance.

I thank you for your time.

Searched for donut and crumpit. Found donate and stumbit instead.
  • Comment on Which module for maintaining hash insertion order?

Replies are listed 'Best First'.
Re: Which module for maintaining hash insertion order?
by choroba (Cardinal) on Feb 16, 2015 at 17:39 UTC
    What modules did you find on CPAN?

    From what I've seen, Tie::IxHash is quite popular. You can also check the modules' reviews and ++'s.

    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

      Thank you for singling out this module. It does what I need & etc. so I'm going to use it.

      Searched for donut and crumpit. Found donate and stumbit instead.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2025-12-08 23:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (88 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.