Thank you very much for your response. Could you recommend any solution? I know the path where the file is sitting and I want to create a script that would automatically upload it. (I don't want the user to be bothered with entering the path each time.)
Thank you, ps. You said: "you want to take this to the beginners cgi list"; isn't this the beginner's mailing-list? ([EMAIL PROTECTED]) >Subject: Re: uploading files >Date: Mon, 11 Mar 2002 09:17:24 -0800 > >At 12:36 AM 3/11/02 -0600, Mariusz wrote: >>Hi, >> >>I wrote this simple script to upload files, but when I substitute >>param('uploadfile') with the actual path in double quotes it doesn't work >>that way. However, it works perfectly fine if I use the form to submit the >>path of the file through an html form (the way it is below). Can anyone >>help? > >You want to take this to the beginners-cgi list. > >The value returned from param() for a file upload is magical and evaluates >as the name of the file in a string context and a filehandle to the file >contents in IO context. You can't just replace it with a string. > >>my $file = param('uploadfile'); >> >>open(UPLOAD, ">../employees/schedule.html") || Error(); >>my ($data,$length,$chunk); >>while ($chunk = read ($file, $data, 1024)){ >> print UPLOAD $data; >>} >>close(UPLOAD); >> >> >>Thanks, >>Mariusz > >-- >Peter Scott >Pacific Systems Design Technologies >http://www.perldebugged.com > _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]