open(LOGFILE, "accesslog.txt") or print "Can't open access log";
  
$totalHits = 0;
%addressHash = ();

while($line = <LOGFILE>) {
	@fields = split(/\s+/, $line);
  $addressHash{$fields[0]} = 1;
  $totalHits++;
}
close(LOGFILE);
  
$uniqueHits = keys %addressHash;
print "The total number of hits is $totalHits\n";
print "The number of unique clients is $uniqueHits\n";
