title: How do I get the dirname of a file with Perl?
body: <p>In my perl script, I have the param <code>$FILE=/etc/sysconfig/network</code></p>
  
  <p>in which way (in perl) I can cut only the directory and put the directory in $DIR param</p>
  
  <p>in order to get:</p>
  
  <pre><code>$DIR=/etc/sysconfig
  
  (like dirname /etc/sysconfig/network in shell script)
  </code></pre>