in reply to uploading files in CGI
After that you will need to do a conversion. This is not a simple job, so don't try to figure it out for yourself. Just use a utility. A brief search turned up word2x, give that a shot and report back whether it worked. If it does not you should be able to find another conversion utility out there.
UPDATE
Having read it again, I notice that your open does not
have a die on failure. That is probably because you are
copying the code example. But still in a CGI script you
should:
at the top so dies go back to the user, and then in your open:use CGI::Carp 'fatalsToBrowser';
You should also have some sort of locking logic for cases where two people both launch the CGI at the same time (or one person double-clicks on submit). Simple Locking shows one approach you might want to use.open(UPLOAD, ">$tempfile") or die "Cannot write $tempfile: $!";
|
|---|