The main difference between file uploading and normal forms
lies in the way the form values are passed. When a file is
uploaded, the target cgi has to expect multipart form data,
which is different than the key1=value1&key2=value2 format
you may be used to. For an understanding of what multipart
data looks like, you might want to scan through
. After you
look at the examples though, I'm pretty sure you'll decide
that it's not worth it to take the time to parse it
yourself. As posted above, CGI.pm has a very clean
interface to handling file uploads, and is a great way to
go. This post is probably only useful if you care to find
out any of the behind-the-scenes working of file upload.