in reply to Re^2: true from (-e "") on Windoze
in thread true from (-e "") on Windoze

Works fine for me. Also, here is a handy table for this sort of thing: "Truth tests for different values" on True or False? A Quick Reference Guide. defined $file, however, would be true for an empty string.

edit: Oops, I didn't catch that there were quotes inside quotes...

Replies are listed 'Best First'.
Re^4: true from (-e "") on Windoze
by CountZero (Bishop) on Jul 02, 2012 at 19:42 UTC
    Yep, it's the quotes-within-quotes that is the problem.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics