####THIS CODE IS ALL IN A WHILE LOOP SO THE VALUE #### OF $remoteIP MAY BE CHANGING EACH TIME #sets the hash for first time thru the loop if (! exists ($hash{$remoteIP})){ $hash{$remoteIP} = 99999999999999999999999999999 } print $hash{$remoteIP}."\n"; # checks if epoch time of $remoteIP is less greater #than the previous time set for that variable. # if so, it updates it so the value of the key # is the earliest time if ($hash{$remoteIP} > $logDate){ $hash{$remoteIP} = $logDate; } print $hash{$remoteIP}."\n"; print %hash; my @k = keys %hash; my @v = values %hash; if ($remoteIP ~~ @k){ if ($hash{$remoteIP} > $logDate){ print "YAY IT WORKED"; } } #### if ($remoteIP ~~ @k){ if ($hash{$remoteIP} > $v[$remoteIP]){ print "YAY IT WORKED"; } }