in reply to If File Exists

You may also want to check that it's a file (not a directory or special file), and that it's readable and writeable. Try:

if (-e "$ENV{REMOTE_ADDR}.$ENV{HTTP_COOKIE}.txt") { if (-f _) { if (-r _) { if (-w _) { #Do stuff here } else { #Not writable } } else { #Not readable } } else { #Not a file } } else { #Doesn't exist }

You can put all the checks in the one if by anding them if you only need to check that the file exists and is accessable.

Colin Scott
If you build it, they will be dumb...