my $path = "/path/to/file_or_dir"; if (-f $path) { # this is a file } if (-d $path) { # this is a directory }
--
hiseldl
What time is it? It's Camel Time!
In reply to Re: directory or file?
by hiseldl
in thread directory or file?
by rupesh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |