[sf-perl] Happy fun sorting problem
josh at agliodbs.com
Fri Jun 10 09:36:51 PDT 2005
I can think of a few ways to solve this issue, but none that are elegant. I'm
looking for elegant.
I have a 3-level heirarchy:
Item = Value
I want to print output that formats like:
Item_a = Value
Item_f = Value
Item_d = Value
Item_k = Value
The idea being to group by sorted category, then by sorted subcategory, then
sort the items on their keys within that. The Items happen to be unique, but
I'm not sure that makes a difference to the problem. To further complicate
things, the "Category" level is being sorted according to an external
ordering list and not alphabetically.
Inside a database, I would just query and sort. But this is completely in
perl. What's the standard way of dealing with this? Hashes of hashes?
Aglio Database Solutions
More information about the SanFrancisco-pm