You're probably looking for the -d and -f file test operators. There is a discussion of them in the Camel Book section 1.5.7.
print "this is a file\n" if -f; print "this is a directory\n" if -d;
You might prefer to use a module like File::Find instead. It has all of your logic built into it already.
Hope that helps.
--
Allolex
In reply to Re: Diff between file and directory
by allolex
in thread Diff between file and directory
by chuleto1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |