At first I thought it had something to do with the system function so I try to reproduce it with a simple script (system.cgi):
but it ran well on FireFox, it displayed the text on the browser, I could save it to a file, and the content is:#!/usr/bin/perl print "Content-type: text/plain\n\n"; system 'uptime';
However, I'm a bit curious to see the appearantly overlapping code below the while {} block in convert_word2.cg. You may try to remove that code that reopen the $out file and let fiction_word_to_txt prints its output directly to the browser so you don't have to redirect it to a temporary file, like:$ cat /tmp/uptime-system.cgi 09:08:55 up 1:10, 4 users, load average: 1.23, 0.80, 0.48
Another possible option is to convert the doc file on the fly without external program so it works with filehandle. In other words, streaming the file. Is fiction_word_to_txt a Perl program? See also if OLE::Storage can help you.system("/home/bcrowell/Documents/programming/scripts/fiction_word_to_t +xt <$in") and die "error executing fiction_word_to_txt: $!\n";
Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!
In reply to Re: CGI outputs plain text -- can't "Save Page As?"
by naikonta
in thread CGI outputs plain text -- can't "Save Page As?"
by bcrowell2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |