Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: true from (-e "") on Windoze

by scorpio17 (Abbot)
on Jul 03, 2012 at 13:11 UTC ( #979690=note: print w/replies, xml ) Need Help??


in reply to true from (-e "") on Windoze

How about this:
$file = '""'; if ( -e $file && -f $file ) { print "Yes\n"; } else { print "No\n"; }

Replies are listed 'Best First'.
Re^2: true from (-e "") on Windoze
by monsoon (Pilgrim) on Jul 03, 2012 at 15:22 UTC
    I think -f rules out too much, named pipes for example. It all depends on what kind of files the list can contain.