in reply to Re^4: Hashes do preserve insertion order after all
in thread Hashes do preserve insertion order after all

You will always need to update two data structures if you reuse Perl structures.

The OP suggested using sort, so how efficient is that without caching the result?

Maybe B-Trees are better suited here, though this certainly depends on the use case.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

  • Comment on Re^5: Hashes do preserve insertion order after all