title: Creating folder using perl
body: <p>I want to create folder using perl where, in the same folder, a perl script exists. I created FolderCreator.pl which requires an input parameter of <code>folder name</code>.</p>
  
  <pre><code>unless(chdir($ARGV[0]){ # If the dir available change current , unless
      mkdir($ARGV[0], 0700);                             # Create a directory
      chdir($ARGV[0]) or die "can't chdir $ARGV[0]\n";    # Then change or stop
  }
  </code></pre>
  
  <p>This worked fine only if we call the scipt, in the same folder where it resides. If it is called in another folder, if doesn't work.</p>
  
  <p>Eg.</p>
  
  <pre><code>.../Scripts/ScriptContainFolder&gt; perl FolderCreator.pl New
  .../Scripts&gt; perl ./ScriptContainFolder/FolderCreator.pl New
  </code></pre>
  
  <p>First one is working fine but second one doesn't. Is there way create these folders?</p>