Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: How to keep the order of keys in hash

by perlfan (Vicar)
on Jul 09, 2014 at 17:47 UTC ( [id://1092949]=note: print w/replies, xml ) Need Help??


in reply to How to keep the order of keys in hash

I think you want to use Tie::Hash::Indexed, maybe.

I don't think that Data::Dumper is going to show you want you want since it's the internal implementation of the hash's accessors via the Tie::Hash interface that actually provide the ordering you need.

If you need to maintain some sorted order not related to insert order, then you might need to look as some sort of Perl based heap implementation like, Heap::Simple.

  • Comment on Re: How to keep the order of keys in hash

Replies are listed 'Best First'.
Re^2: How to keep the order of keys in hash
by thanos1983 (Parson) on Jul 09, 2014 at 19:46 UTC

    Hello perlfan,

    I will read the Heap::Simple CPAN module that you suggested. It is always nice to learn more things.

    Thank you for your time and effort replying and assisting me on my question.

    Seeking for Perl wisdom...on the process...not there...yet!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-24 04:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found