I am trying to do a simple upload of a .csv file and save it on my server. I'm not an expert in HTML or Perl, but due to client constraints this is what I must do.Here is the HTML:\[code\]<form action="/path/to/service" target="_self" method="POST" enctype="multipart/form-data">File: <input type="file" name="attachment" size="50"><SUBMIT_RESET Upload File></form>\[/code\]The Perl code looks like this:\[code\] my $sql = "SELECT NOW()"; my $date = $DB->get_field($sql); my ($path, $ext) = split(/\./, $in{'attachment'}); my @pathParts = split(/\//, $path); my $filename = $pathParts[@pathParts - 1] . " - " . $date; if ($ext eq "csv") { open (OUTFILE, ">", "$datadir/imports/" . $filename . "." . $ext); while (read($in{'attachment'}, $buffer, 1024)) { $file .= $buffer; } print OUTPUT $file; close (OUTFILE); }\[/code\]Can anyone please give me some direction as to what I'm doing wrong. I get the file located at the correct path, but it's always empty.Now, the code base I'm dealing with here is horrible and I cannot use strict.Suggestions?