Given a hash : %detailModel
with keys: $model = "Alpha Name of Automobile"
Holds Values as Pipe Delimited (E.G): PICKUP 1/2T|999999|1999|DODGE|200
3|99
So Thats: Make|Account|Year|Make|Tax
Year|Seq
I want to sort this data by model, make, year, seq
I am lost on how I should go about this.
When I initially loaded the hash if there were multiple occurrences of the same model I just tacked on a decimal to the word (e.g. pickup 1/2.1). This actually worked and got me around that so I could use a hash as the sorting function. However if I reload a hash with a new key after sorting it once I will lose the sort from the first sort... hope that made sense.
I figure somebody will get kinda what I talking about and have at least some pseudo code that will shed some light on this.
I am a beginner with Perl so please add some comments/explanation to any code.
Thanks in Advance!
Start Free Trial