my $maxsize = 1024; my $maxtime = 30; my ($fsize, $ftime) = (stat("click.save"))[7,9]; open(OUTF, ">>click.save"); print OUTF "$ENV{REMOTE_ADDR}|$date|$timestamp\n"; close(OUTF); if ($fsize > $maxsize || ($ftime + $maxtime) < time) { #### Checks all IP's against database using an sql 'WHERE ip IN ('111.111.111.111, '...)' to find if unique #### Does a bulk insert in one call to the db }#if