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

Hi I am trying to upload a users file to my web server using the <input type=file name=upload> tag in a form. I receive the path to the file on the users machine fine but when i try to use it as a file handle as it says in the CGI man page while (<$upload>){ print; } It does not return anything, could anyone help me please.....

Replies are listed 'Best First'.
Re: Uploading Using the CGI module
by davorg (Chancellor) on Nov 08, 2001 at 19:22 UTC

    I think we'd probably need to see a little more of the code in order to help.

    --
    <http://www.dave.org.uk>

    "The first rule of Perl club is you don't talk about Perl club."

Re: Uploading Using the CGI module
by cfreak (Chaplain) on Nov 08, 2001 at 20:54 UTC
    This often happens if you don't have enctype="multipart/form-data" in your HTML form tag. But as davorg said, post some of the code.