in reply to Sorting hash
Your example shows you indexing the hash keys in the wrong order; it was trying to find the key named "1" in the %$results hash, which didn't exist. Use: foreach my $router ( sort {$results->{$a}{1}{cpu} <=> $results->{$b}{1}{cpu} } keys %$results ).
|
|---|