title: perl iterate through directories
body: <p>I'm trying to get the name of all directories in the specified path</p>
  
  <p>I tried the following but that gives me every level down not just at the path i specified</p>
  
  <pre><code>find(\&amp;dir_names, "C:\\mydata\\");
  sub dir_names {
      print "$File::Find::dir\n" if(-f $File::Find::dir,'/');
  }
  </code></pre>