if (-e "$ENV{REMOTE_ADDR}.$ENV{HTTP_COOKIE}.txt") { do something if file exists } else { file does not exist }