Why doesn't Perl see a file that exists on Windows?
On one of my coleagues machines, if you are just looking for java, you can find it:
c:\>where java
C:\Windows\system32\java.exe
However, if I do this test in perl:
c:\>perl -e "print (-e 'c:\\windows\\system32\\java.exe' ? 'found' : 'not found')"
not found
(this works great on my machine). I've heard of some weird cache where files get fake so they get sorted, but I have no idea what this could be causing and nothing I was looking for helps.
source to share
As mentioned in the comment to Andrew Medico's question, the issue was a confusion caused by running 32bit perl.
This system had "c: \ windows \ system32 \ java.exe" but did not have "c: \ windows \ syswow64 \ java.exe". I was able to solve my problem by looking at "c: \ windows \ sysnative \ java.exe" if "c: \ windows \ system32 \ java.exe" doesn't seem to exist.
I found this description very helpful:
http://www.samlogic.net/articles/32-64-bit-windows-folder-x86-syswow64.htm
source to share