$ cat test.pl #!/usr/bin/perl use strict; use warnings; my @files = (' ', ' . . ', ' .. ', ' ', ' . '); foreach (@files) { print "[$_] - ", -e $_ ? "yes\n" : "no\n"; } $ ./test.pl [ ] - no [ . . ] - no [ .. ] - no [ ] - no [ . ] - no $ perl -v This is perl, v5.8.3 built for i386-linux-thread-multi