So nachmal ich, wenn ich in der Sub upload_file, print STDERR Dumper($cgi); schreibe erhalte ich unter Perl 5.8.7 folgende Ausgabe
Quote$VAR1 = bless( { '.parameters' => [ 'user_pic', 'action', 'Button' ], '.charset' => 'ISO-8859-1', 'Button' => [ 'Upload' ], 'action' => [ 'upload' ], '.fieldnames' => {}, 'user_pic' => [ bless( \*{'Fh::fh000010010.JPG'}, 'Fh' ) ], '.iterator' => 4, 'escape' => 1 }, 'CGI' ); $VAR1 = bless( { '.parameters' => [ 'user_pic', 'action', 'Button' ], '.charset' => 'ISO-8859-1', 'Button' => [ 'Upload' ], 'action' => [ 'upload' ], '.fieldnames' => {}, 'user_pic' => [ bless( \*{'Fh::fh000010010.JPG'}, 'Fh' ) ], '.iterator' => 4, 'escape' => 1 }, 'CGI' );
Unter Perl 5.8.8 folgende
Quote$VAR1 = bless( { '.parameters' => [ 'user_pic', 'action', 'Button' ], 'use_tempfile' => 1, '.tmpfiles' => { '*Fh::fh000010010.JPG' => { 'info' => { 'Content-Type' => 'image/jpeg', 'Content-Disposition' => 'form-data; name="user_pic"; filename="0010.JPG"' }, 'name' => bless( do{\(my $o = 'C:\\temp\\CGItemp56214')}, 'CGITempFile' ), 'hndl' => bless( \*{'Fh::fh000010010.JPG'}, 'Fh' ) } }, 'user_pic' => [ $VAR1->{'.tmpfiles'}{'*Fh::fh000010010.JPG'}{'hndl'} ], 'Button' => [ 'Upload' ], '.charset' => 'ISO-8859-1', 'action' => [ 'upload' ], '.fieldnames' => {}, '.iterator' => 4, 'escape' => 1 }, 'CGI' ); $VAR1 = bless( { '.parameters' => [ 'user_pic', 'action', 'Button' ], 'use_tempfile' => 1, '.tmpfiles' => { '*Fh::fh000010010.JPG' => { 'info' => { 'Content-Type' => 'image/jpeg', 'Content-Disposition' => 'form-data; name="user_pic"; filename="0010.JPG"' }, 'name' => bless( do{\(my $o = 'C:\\temp\\CGItemp56214')}, 'CGITempFile' ), 'hndl' => bless( \*{'Fh::fh000010010.JPG'}, 'Fh' ) } }, 'user_pic' => [ $VAR1->{'.tmpfiles'}{'*Fh::fh000010010.JPG'}{'hndl'} ], 'Button' => [ 'Upload' ], '.charset' => 'ISO-8859-1', 'action' => [ 'upload' ], '.fieldnames' => {}, '.iterator' => 4, 'escape' => 1 }, 'CGI' ); [Sat Dec 22 18:09:17 2007] upload.cgi: binmode() on closed filehandle fh000010010.JPG at D:\...\upload.cgi line 189. [Sat Dec 22 18:09:17 2007] upload.cgi: read() on closed filehandle fh000010010.JPG at D:\...\upload.cgi line 194.
Deutet da was auf den Fehler hin?
Tom