There is a thread in this forum a few days back that deals with some issues on uploading......
Here is a simple example using CGI.pm...
[tt]
#!/usr/local/bin/perl
# author:
# date: june 8,2000
# Purpose: figure out how to use CGI.pm to upload file via
# the browser.
##############################################################
use CGI;
$thisCGI = '/cgi-bin/examples/upload';
$query = new CGI;
print $query->header,$query->start_html(-title=>"UPLOAD THIS"

;
print $query ->start_multipart_form('POST',"$thisCGI"

;
print "Enter or Browse to the file you would like to upload.<BR>\n";
print $query->filefield(-name=>'fileID',
-size=>50,
-maxlength=>80);
my $fileID = $query->param('fileID');
@pathName = split(/\\/,$fileID);
$newFile = '/some/new/path/examples/';
$newFile .= pop(@pathName);
if ($fileID)
{
open(OPF,">$newFile"

|| &showError("Failed to open OPF, $!"

;
while ($bytesread=read($fileID,$buffer,1024)) { print OPF "$buffer"; }
$type = $query->uploadInfo($fileID)->{'Content-Type'};
print "<BR>Upload of $newFile of type $type Successful<BR>\n";
}
print '<BR>',$query->submit('doWhat','uploadMe');
print $query->end_form;
print $query->end_html;
sub showError
{
my @error = @_;
print "<CENTER><font color=\"\#ff4500\">Fatal ERROR - @error</font><BR>\n";
print "Submission aborted - your data was not saved!!<BR>\n";
print "Please use the BACK button to return to the previous page<BR>\n";
print "and correct the error.<BR></CENTER>\n";
print $query->end_form,$query->end_html;
exit;
}
[/tt]
hope this helps.