in reply to Hashes for counting

Print out some debug information in your code, like all the hash values as they come in, that way you can see what is happening.
use Data::Dumper; $peer_address = $client_socket->peerhost(); print "peer_address\n"; ## check against previous connections if (exists $has{$peer_address}) { print "exists\n"; $has{$peer_address}->{times_connect}++; print "No. of Times it has communicated : $has{$peer_address}- +>{times_connect}"; } else { print "new connection\n"; $t=1; ++$has{$peer_address}; $has{$peer_address}->{times_connect}=$t; } } #see what you have print $DATA::Dumper(\%has),"\n";

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku