in reply to Creating an HTML file, then (g)zipping it up for a user to dl it?

Based on what I can glean from this thread as to your intentions I think what you are after is Archive::Zip to create the archive and then you can send that archive to the browser in binary mode with the correct HTML headers being set. This is untested, but here is a sniglet of code that I think should work for you:

The only part I am hazy about is the binmode part since I haven't done that in a while. At any rate TIMTOWTDI.


Peter @ Berghold . Net

Sieze the cow! Bite the day!

Nobody expects the Perl inquisition!

Test the code? We don't need to test no stinkin' code!
All code posted here is as is where is unless otherwise stated.

Brewer of Belgian style Ales

  • Comment on Re: Creating an HTML file, then (g)zipping it up for a user to dl it?
  • Download Code

Replies are listed 'Best First'.
Re: Re: Creating an HTML file, then (g)zipping it up for a user to dl it?
by BUU (Prior) on Aug 10, 2003 at 17:43 UTC
    binmode only matters if you're on a win32 type host.

      True... but I don't remember him specifying he wasn't...


      Peter @ Berghold . Net

      Sieze the cow! Bite the day!

      Nobody expects the Perl inquisition!

      Test the code? We don't need to test no stinkin' code!
      All code posted here is as is where is unless otherwise stated.

      Brewer of Belgian style Ales