title: Perl: How to delete files, folders and subdirectories using "rm"?
body: <p>I am trying to delete files and folders using my perl script. I'm using the "rm -rf $file" command to delete the file but its not doing anything. 
  However, when i try the same command on the cmd line it works and deletes files just fine. 
  Attached is the code snippet. Any help is appreciated.</p>
  
  <pre><code>for each $f (@files)
  {
         system "rm -rf $f";
  }
  </code></pre>
  
  <p>I tried this on a couple of machines and its the same problem. However, i tried using other system commands such as mkdir, tar etc and it works just fine.
  I have also tried unlinking but the same problem persists.</p>