⭐ in reply to How do I sort a Hash of Hashes?
You have to rewrite the code so, that it sorts using the string comparitor (cmp) and you have to dereference the Hash of Hashes with an arrow operator.
sort { $products{$a}->{"name"} cmp $products{$b}->{"name"} }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Answer: How do I sort a Hash of Hashes?
by ysth (Canon) on Jan 11, 2004 at 07:27 UTC |