You might read the docs for cgi.pm and especially look for something like file upload but don't miss Ovid's
cgi-course then, cause file uploading might endanger your server. So go and read! :-) It will help to answer your questions.
Have a nice day
All decision is left to your taste