foreach my $sorted_url ( sort { $hash{$b}->{'hits'} <=> $hash{$a}->{'hits'} ) keys %hash ) {