in reply to is there a file/directory?
-e can be used to verify it actually exists, altho both -d and -f will fail if the file/directory not exists...my $file = "/etc/passwd"; my $directory = "/etc"; if (-f $file) { print "file !!" } if (-d $directory) { print "directory !!" }
|
|---|