in reply to Is there a -e test for directories, like there is for files?

You need -e (to see if a file exists with that name) and -d (to see if that file is a directory.

Of course you then need to work out what you're going to do if the file exists and isn't a directory.

See perldoc -X for a full list of file test operators.

  • Comment on Re: Is there a -e test for directories, like there is for files?