in reply to Read an input file in two hashes to retain order
Hi Bioinfocoder,
It looks like your file is basically an ini-style file with sections, keys and values, with the addition of the "nice name" subsection labels.
I would remove the "subsection" labels, which are really part of your presentation, and put them in a hash keyed by the real config names for lookup and use when needed. Then I would use Config::Tiny::Ordered to read from and write to the file.
Edit: Since you say "The order of First_Name, Last_Name and Age within each location can change and even order of locations can change, but each location section should remain separate and intact" you could just use Config::Tiny which is a little easier to work with since you use named hash keys rather than array indices to work with the config settings.
Hope this helps!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Read an input file in two hashes to retain order
by Bioinfocoder (Novice) on Mar 18, 2016 at 16:19 UTC |