If getAccessLog is the sub that has that return statement,
$log->{hits} will be a hashref to a copy of your original %hits. You can copy it to another hash like my %hits = %{$log->{hits}};, or just use the hashref in various ways like:
my $hits = $log->{hits};
print keys %$hits; # print all the keys
print "$key => $value\n" while (my ($key, $value) = each %$hits); # du
+mp all
print $hits->{keyX}; # print one value