When you are using a web form and a <input type='file' *> tag you never write the code that reads the file from the user's system. That would be a big security no-no if it were possible. That is taken care of by the web browser. I am assuming that you are trying to upload that file to the web server.
You should look at CGI. It has some good example's of uploading files.