-e = exists
Or better yet,
if (! -f $file) { print "oops, that's a folder name."; }
-f = is ordinary file
Edit: after a re-read (I hate it when I do that) if you're trying to verify the file's not there, you could just do
if (-f $file) { sleep 1; &check_again; }