in reply to Data Structure
You will need to group your input by the specified criteria, so that the related elements are readily accessible at the print time. Now, what are the ways to group data? To sort it would be one, but, judging by the structured and relational nature of your data, the most appropriate approach seems to be to index it as if a database.
Now, what is the perl construct for handling arbitrarily indexed data mapping? What type of variable would you use to store the structure?
Try to answer the above question; we can then advise you further. The perldsc may also be worth consulting.
|
|---|