Managed to get it to work finally by replacing the print location url reference with code as shown below and by redirecting (prior to excuting wzzip.exe) the STDOUT and STDERR to text files.
print "Content-type: text/html\n\n"; print "<HTML><HEAD>\n"; print "<TITLE>CGI Test</TITLE>\n"; print "</HEAD>\n"; print "<BODY><p>Blah Blah. For another enquiry <A HREF=\"http: +//www.something.com/somepage.html\">Click Here</A>\n"; print "</BODY></HTML>"; my $stdout = "stdout.txt"; my $newstdout = 'C:\SomeDir\SomeSubDir/' .$stdout; my $stderr = "stderr.txt"; my $newstderr = 'C:\SomeDir\SomeSubDir/' .$stderr; # redirect STDOUT & STDERR open (my $oldstdout, ">&STDOUT") or die "Can't open old STDOUT: $!"; open (my $oldstderr, ">&STDERR") or die "Can't open old STDERR: $!"; open (STDOUT, ">$newstdout") or die "Can't open STDOUT: $!"; open (STDERR, ">>$newstderr") or die "Can't open STDERR: $!"; my $zip_options = "-a"; open OUT, "| $winzip $zip_options $zip_file $filetoZip" or die "wzzip pipe: $!"; print OUT "\n"; close OUT;
This then captured STDOUT from WZZIP rather than the program trying to send it as HTML page. I sent the HTML page back prior to wzzip ... I realise to some purists this is a terrible thing to do but as it is a repeatable job & text files can be checked for errors & it speeds up processing what the heck!

In reply to Re^2: CGI Wzzip and MIME by Anonymous Monk
in thread CGI Wzzip and MIME by hshepherd

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.