|No such thing as a small change|
Trouble with Tie::IxHashby sara2005 (Scribe)
|on May 23, 2006 at 18:22 UTC||Need Help??|
sara2005 has asked for the
wisdom of the Perl Monks concerning the following question:
I have to read a text file and build a multiple level data structure and display in the same order it was read in.
I found that Tie::IxHash module can make that happen but I can't make it work the way I wanted it to.
First, If I simple create a data strcuture as shown below and try to print it, it doesn't print in the order I created the hash.
Second, I can create individual hash variables and then build the structure but here also I have the same problem - the order is getting changed while printing
But the below example (simple hash) works perfectly...
Hence, I am not sure as to what is going wrong in the multi-level structure as compared to the simple hash. Would someone please help me with this?