marcus: Fehlermeldung bei Dateiupload

Beitrag lesen

ich glaube Du solltest mal dein *.pl script posten.

ja, hier ist es:

#!/usr/local/bin/perl

use strict;
use CGI qw(:all);
use lib "/opt/perl5/lib/site_perl";
use CGI::Carp qw(fatalsToBrowser);

my $cgi=new CGI;
my $file=param ('datei');
my $path='/users/www/htdocs/scripts/rema/database/';
my $upfile=substr($file, rindex($file, "\")+1);
my $ext=substr($upfile, rindex($upfile, ".")+1);
my $state = param ('state');

print header;

open (UPLOAD,">$path/$state/$upfile");
while (read ($file, my $buffer, 1024)) {
     print UPLOAD $buffer;
  }
  close (UPLOAD);

Gruß
Marcus