# code frag written in long hand for clarity (I hope) my $delta_day; my $now = time(); my $oldiptime = ---from your file -- (($now - $oldiptime) >= 86400) ? ($delta_day = 1) : ($delta_day = 0); #### # code fragment there's a use strict lusting above if ( exists ($IP_LIST{$ip} ) { go check delta day and stuff } else { # sdd it $IP_List{$ip} = $now; }