in reply to How to test if a directory exists?
This will work:
$somedir = "c:/windows"; if (-d $somedir) { print "$somedir exists"; } else { print "$somedir does not exist!"; }
If you have a look at perlman:perlfunc and find -X under the Functions for filehandles, files, or directories you will find a range of file tests that can be applied to files and dirs.
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
|
|---|