Example Name Result -e $a Exists True if file named in $a exists -r $a Readable True if file named in $a is readable -w $a Writable True if file named in $a is writable -d $a Directory True if file named in $a is a directory -f $a File True if file named in $a is a regular file -T $a Text File True if file named in $a is a text file
so: if (-d $filename) { print "'$filename$ is a directory\n"; } -----Original Message----- From: Rus Foster [mailto:[EMAIL PROTECTED] Sent: Thursday, July 24, 2003 2:39 PM To: [EMAIL PROTECTED] Subject: Checking for a directory Hi All, Just trying to work out the code to test if a path is a directory or file. Looked over the stat function but doesn't quite seem right. Can someone give me a clue thanks Rus -- www: http://jvds.com | Virtual Servers from just $15/mo MSNM: [EMAIL PROTECTED] | Totally Customizable Technology e: [EMAIL PROTECTED] | FreeBSD & Linux 10% donation to FreeBSD.org on each purchase -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]