in reply to Prevent windows dialog when using file test -e

Is this some XP-specific behaviour ? On 2000 I get no error dialog with such a test:
D:\>perl -e "print -e 'G:\some.file'" D:\>
'G' is my (empty) CD-ROM drive. The '-e' test simply returns undef as it does for any non-existent file.

Cheers,
Rob

Replies are listed 'Best First'.
Re^2: Prevent windows dialog when using file test -e
by ikegami (Patriarch) on Jun 23, 2006 at 02:01 UTC
    I don't get the dialog on WinXP and perl v5.8.0. I just assumed different drives behaved differently.
      Have you worked with the drives before and then eject the media ? On my machine it happens only in this case (on XP, never seen it under 2000). I use mostly perl 5.8.8, also it is from inside a wxPerl app (dont know if it makes any difference)