title: How to create zip file in perl?
body: <p>Hi friends i can create a zip file using files which is there in the directory where the script is currently running now i want to create zip file from various directory can anybody help me?
  my code is;</p>
  
  <pre><code>use IO::Compress::Zip qw(:all);
  
    zip [ glob("inventory_report_for_neus.xls") ] =&gt; "my.zip"
      or die "Cannot create zip file: $ZipError" ;
  </code></pre>
  
  <p>this will produce zip file with specific files but </p>
  
  <pre><code>use IO::Compress::Zip qw(:all);
  
        zip [ glob("..\\inventory_report_for_neus.xls") ] =&gt; "my.zip"
          or die "Cannot create zip file: $ZipError" ;
  </code></pre>
  
  <p>this is also produce zip file but there is no file inside!</p>