bobinyec has asked for the wisdom of the Perl Monks concerning the following question:

I'm using an html file to send a file to my server, using POST. The data looks like this: data = -----------------------------16541483331115 Content-Disposition: form-data; name="txtFileName"; filename="Test.txt" Content-Type: text/plain Fred+ Bill -----------------------------16541483331115-- The real file contents is "Fred+ Bill " . Is there an easy way to extract just the file contents from this? Does anything need to change if this is a binary file rather than a text file? How about in the html file? Thanks, John Bobinyec

Replies are listed 'Best First'.
Re: How to File Transfer via POST?
by Corion (Patriarch) on Jun 21, 2010 at 18:13 UTC

    Most likely you want to use CGI, which handles saving the file and MIME-decoding the data stream for you.

Re: How to File Transfer via POST?
by bobinyec (Acolyte) on Jun 25, 2010 at 09:12 UTC