-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 !!" }
In reply to Re: is there a file/directory?
by Beatnik
in thread is there a file/directory?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |