in reply to uploading files in CGI

helo,

for binary files do:

open(FILE1, ">$file") or die "uploaden not working"; binmode FILE1; while (my $bytesread = read($file1, my $buffer, 1024)) { print FILE1 $buffer; }

also don't forget to give in the form tag: ENCTYPE="multipart/form-data"

Hope this helps you on your way.

Oh btw look in the code section of this site, there's a script to upload file. Or use supersearch, this is a question which is answered before :-)


My opinions may have changed,
but not the fact that I am right

Replies are listed 'Best First'.
RE (tilly) 2 (not on Linux): uploading files in CGI
by tilly (Archbishop) on Sep 28, 2000 at 15:35 UTC
    He said he was on Linux. On Linux binmode is a no-op.

    But for portable code, absolutely.