in reply to File Existence using "-e" not always working

Try opening the file for read?
  • Comment on Re: File Existence using "-e" not always working

Replies are listed 'Best First'.
Re^2: File Existence using "-e" not always working (auto mount)
by tye (Sage) on Mar 28, 2014 at 02:07 UTC

    Exactly.

    Looks like "auto mount" behavior. It is common that checking for a file's existence won't trigger the automatic mounting of the remote file system but that trying to read a file will trigger that.

    So just trying to open the file, as suggested, will likely also trigger it.

    my $exists = do { open my $fh, '<', $db_path };

    - tye