develooper Front page | perl.beginners | Postings from February 2002

Re: sort order of hash keys

Thread Previous
Jeff 'japhy' Pinyan
February 26, 2002 05:35
Re: sort order of hash keys
Message ID:
On Feb 26, Martin A. Hansen said:

>i would like to know if theres a smart way to unwind a hashtable so that
>the key / value pairs comes out in the same order as they are in the table.

What "table"?  If you'd like a hash to stay in the order you CREATED it
in, use the Tie::IxHash module.

Jeff "japhy" Pinyan
RPI Acacia brother #734
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.
[  I'm looking for programming work.  If you like my work, let me know.  ]

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About