Chris Shannon cshannon at
Tue Aug 31 06:51:05 CDT 1999


I've been trying to get the below script to work, but so far, this is what

After doing chmod 777 on the directory where the files are to be uploaded,
the script will create an empty file in the upload directory, the name
returned by
param('filename') really is the file name, however, nothing uploads.  The
script is activated by a web browser using a form with an upload file field
in a form.

Using perl -c -w, the syntax checks out OK and there are no warnings except
that the $bytesread scalar is pointed out as occuring only once, which can
be forgiven here.

What could be wrong?

Thanks in advance, Chris Shannon (Shannon Design)

use lib '/http/yourwebsite/mylib';
use CGI qw(:standard);

$ofn = '/http/';

$| = 1;

open OUTFILE, ">$ofn";

while ($bytesread=read($fh,$buffer,1024)) {
   print OUTFILE $buffer;


chmod (0666, "$ofn");

More information about the Baltimore-pm mailing list