I want to sort a hash which actually has a hash as a value. For instance:
my %hash1=( field1=>"", field2=>"", count=>0, ); my %hash2; $hash2{"asd"}={%hash1};
and I inserted lots of hashes to %hash2 with different count values of %hash2. How can I sort the %hash1 according to a count value of hash1? Is there a way of doing this without implementing quicksort manually, for instance with the sort function of Perl?
In reply to How can I sort a hash of hashes by key in Perl? by boom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |