高手帮我看个perl写的CGI, 功能是文件上传.

高手帮我看个perl写的CGI, 功能是文件上传.

高手帮我看个perl写的CGI, 功能是文件上传.
首先我不知道,上传文件放在哪里?
其次,上传成功,给出的提示页面是什么样子.希望大家不吝赐教!
把程序给大家
#!/usr/bin/perl
use CGI;
$onnum = 1;

while ($onnum != 11) {
my $req = new CGI;
my $file = $req->param("FILE$onnum");
if ($file ne "") {
my $fileName = $file;
$fileName =~ s!^.*(\\|\/)!!;
$newmain = $fileName;
if ($allowall ne "yes") {
if (lc(substr($newmain,length($newmain) - 4,4)) ne $theext){
$filenotgood = "yes";
}
}
if ($filenotgood ne "yes") {
open (OUTFILE, ">$basedir/$fileName");
print "$basedir/$fileName<br>";
while (my $bytesread = read($file, my $buffer, 1024)) {
print OUTFILE $buffer;
}
close (OUTFILE);
}
}
$onnum++;
}

print "Content-type: text/html\n";
print "Location:$donepage\n\n";