in reply to -e falling through

Try
-e $file or die "what happened? $! $^E";

Replies are listed 'Best First'.
Re^2: -e falling through
by slinky66 (Initiate) on Dec 08, 2009 at 17:20 UTC
    Great. Thanks. That helped me figure out what was going on
Re^2: -e falling through
by ikegami (Patriarch) on Dec 08, 2009 at 17:05 UTC

    It's only an error if -e returned undef.

    defined(my $exists = -e $file) or die("Error checking if \"$file\" exists: $! $^E\n"); print("$file ", ($exists ? "exists" : "doesn't exist"), "\n");