in reply to hash sort problems
This first compares $a vs. $b. If they're equal, then it falls back to comparing $hash{$a} against $hash{$b}. Your code is using an && instead of || or "or". I don't understand what that's for.sort {$a cmp $b or $hash{$a} cmp $hash{$b}} keys %hash;
However, in the example I just gave, the secondary comparison is useless, because a hash always has unique keys. Therefore, the second part of the "or" clause will never be evaluated.
I'm not sure why you're comparing $my_server_hash{$a} vs $my_server_hash{$b}, because these are apparently hash refs, which don't compare in any useful way.
If you give more info on the format of the data in your hash (as opposed to what it looks like once you render it in html) we might be able to give you more useful help.
Alan
|
|---|