Perl Monk, Perl Meditation | |
PerlMonks |
Re: directory or file?by pfaut (Priest) |
on Apr 16, 2003 at 13:08 UTC ( [id://250884]=note: print w/replies, xml ) | Need Help?? |
Use the filetest operators which are described in perldoc perlfunc. -f FH or -f "filename" returns true for a normal file. -d "filename" returns true for a directory. There are many others that return various pieces of information about the specified file.
In Section
Seekers of Perl Wisdom
|
|