in reply to directory exists
I'm surprised it doesn't work (assuming, of course that /mydir indeed exists). Is this a Unix system?
Incidentally, I would use the -d test in this case, which implies -e, and returns true only if the tested file not only exists, but is actually a directory. For example (OS: Linux):
% perl -wle '$x=q(/boot); print "OK" if -d $x' OK
the lowliest monk
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: directory exists
by Anonymous Monk on Jun 03, 2005 at 00:40 UTC |