Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
unable to open existing file after trying to open a non-existing oneby monk_of_gaia (Initiate) |
on Sep 23, 2003 at 15:26 UTC ( [id://293530]=perlquestion: print w/replies, xml ) | Need Help?? |
monk_of_gaia has asked for the wisdom of the Perl Monks concerning the following question:
1. I open an existing file. Result: OK 2. I try to open or test the existance of a non-existing file with "-e" 3. I open an existing file. Result: ERROR I tried it with Perl v5.003_07 for Win32 Build 316, Perl v5.004_02 Win32 and 5.005_03 built for MSWin32-x86-object build 518. I have BMC Patrol on this Win2k machine, and these Perls comes with BMC Patrol. It is not possible at this moment to upgrade Perl on this machine. The test program: test.out is an existing file, tt1 is not. The output is: If I comment out the middle part, the if (-e "tt1") { ... and just simply open & read & close the file twice, I get: This is more, than annoying and more than weird. Could you please suggest any workarounds?
Back to
Seekers of Perl Wisdom
|
|