Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Perl
Perl Misc
Tie::IxHash::Easy with "eval()"
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Pat, post: 4849796"] Hi, I'd like to use "Tie::IxHash" to maintain the order of keys in a hash. Since the hash can contain other hashes (and so on), I need to use "Tie::IxHash::Easy" so that the nested hashes also maintain their ordering. I'm reading the entire hash from a file. The format of the file is exactly like Data::Dumper so that I can build the hash by simply saying: eval($file_contents); This fails because there's no way to "tie" the internal workings of eval to "Tie::IxHash::Easy" so it always just returns a normal hash. Copying the returned into an IxHash has no effect because the ordering is already lost. So, how can I load an IxHash from a file in Data::Dumper format and preserve its order (including nested hashes)? Thanks. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Perl
Perl Misc
Tie::IxHash::Easy with "eval()"
Top