I don't understand what your data structure is supposed to be. How to these source and destination IPs relate to one another? What is @entries? Why are you referencing a hash that isn't defined yet? (%hash0 = ( $srcIP => \%hash1);)
Why aren't you using strict?
Could you describe in more detail exactly what you're trying to count?