in reply to Re: Building hash tree from data file -contd
in thread Building hash tree from data file -contd
Sorry about all the confusion
I had updated the original link but as I didn't get any response, I thought no one will ever look at it. Hence, I created a new post with reference to the original. ...a bit of Panic...
As suggested, I have created an id for my own.
Thanks for your comments and code.. It works nicely..
Update: Using 'Tie', I was able to get the output in the order it was fed into the data structure..
use Tie::Autotie 'Tie::IxHash'; tie my %linked_dsc, 'Tie::IxHash';
some progress...
I want to try few other things by shuffling the blocks in the data file,etc..like shown below and modify the code as required.
Update 2:Atlast, I managed to achieve (script might be clumpsy though compared to your standards) what I wanted- modified the code to read and build the tree irrespective of the order in which the block appears (except for the first one) and also print the hash in the order it was read inside..
You guys are great!!! for the help, guidance and what not.. whatelse I can say!!! special thanks to graff (as I stole his code to create the structure and used that as a subroutine)
Main Name = Countries End Sub Action = Find: NA Text = North America End Sub Action = Find: EU Text = Europe End --- Main Name = EU End Sub Action = Text = France End Sub Action = Text = Italy End --- Main Name = US End Sub Action = Text = Boston End Sub Action = Text = Atlanta End --- Main Name = NA End Sub Action = Find: US Text = United States End Sub Action = Find: CA Text = Canada End Sub Action = Find: MX Text = Mexico End ---
Again.. thanks for your time and guidance
|
|---|