in reply to Re: Open a Microsoft Word Doc and Save as plain text file
in thread Open a Microsoft Word Doc and Save as plain text file

Thank you monks for your inputs.

I found this code from CGI to be very good in determining the type of file

my $cgi = new CGI; my $file = $cgi->param('file'); my $type = $cgi->uploadInfo($file)->{'Content-Type'};

Replies are listed 'Best First'.
Re^3: Open a Microsoft Word Doc and Save as plain text file
by sgifford (Prior) on Jun 08, 2006 at 17:50 UTC
    Ah, yes, good idea. It does rely on the client to identify the document, though; if the user's Web browser doesn't know what the file is, it will probably be reported to you as application/octet-stream or text/plain if it smells like text.