in reply to If File Exists

Try:
if (-e "$ENV{REMOTE_ADDR}.$ENV{HTTP_COOKIE}.txt") { do something if file exists } else { file does not exist }
Check out How do I test if I file exists without attaching a filehandle to it?.

Replies are listed 'Best First'.
POTENTIAL SECURITY HOLE
by merlyn (Sage) on Jun 19, 2000 at 17:56 UTC
    No. Don't use anything starting with HTTP_ directly in any file path. This is an arbitrary string coming from the browser, and can be manipulated directly by a person with ill intentions.

    -- Randal L. Schwartz, Perl hacker