in reply to Re^3: directory exists
in thread directory exists

Even that's redundant. The -d function by itself DWYM, and returns undef if the stat fails, false if the file exists but is not a directory.