in reply to Creating files within a .zip

Try this.
use strict; use warnings; use IO::Compress::Zip qw(:all); { my $zip = new IO::Compress::Zip "/tmp/my.zip", Name => "foo/bar.txt" or die "Cannot create zip file : $ZipError\n" ; print $zip "hello world" ; } # Check the zip file was created system "unzip -l /tmp/my.zip" ;
Here is what I get this when I run that code.
Archive: /tmp/my.zip Length Date Time Name --------- ---------- ----- ---- 11 09-28-2012 16:44 foo/bar.txt --------- ------- 11 1 file