title: Perl directory exists equivalent of -e
body: <pre><code>-e  File exists.
  </code></pre>
  
  <p>is there one for directory exists? 
  because i didnt see it on <a href="http://perldoc.perl.org/functions/-X.html" rel="nofollow">http://perldoc.perl.org/functions/-X.html</a></p>
  
  <p>Or what would be a best way to test it?</p>
  
  <pre><code>next unless (-e $dir . "/dirname");             -e only for file so doesnt work
  </code></pre>
  
  <p>I am trying to avoid doing <code>opendir and grep</code> to find the dirname because it seems to be overkill. </p>
  
  <p>updated question:<br>
  does perl concat $dir . "/dirname" before doing the -e or -d check?  </p>