perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Stepanov <>
Subject Strange problem with upload file
Date Thu, 12 May 2005 09:51:43 GMT
Dear all,

I have a strange problem with upload file. It was happened only once but 
I'm afraid that
it can be again.
I have a some form like that:

<form 	name="upload_answer" 

Select File:&nbsp; <input 	class="textinput" 

In upload.epl I just get filehandler and use it as method's argument:

my $up_obj = new UploadFile();

At the end inside class I use that file handler:

sub upload_file {
    my $self = shift;
    my $fh = shift || die 'File is not uploaded!';

    while(my $row = <$fh>) {
       die "Length of row should be 80!" unless length($row) == 80;
       . . .
    . . .

Recently, I've found in Apache log file that message:
    Warning in Perl code: readline() on closed filehandle 

It seems that file was uploaded but before reading procedure was started 
file handler was closed by
some reason. The strange thing is the loop was run once and program was 
not die in checking of
length of row!

So, does somebody know where Embperl stores uploaded files? Why file 
handler was closed and how check is file handler is open or not?

I use:  - Linux RedHat 9, Embperl/2.0b9, Apache/2.0.40, 
mod_perl/1.99_07-dev, Perl v5.8.0

Thanks in advanced.

Best regards, 
Michael Stepanov
Perl/Linux Developer
Francoudi & Stephanou Ltd
Tel: +357 25-867154

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message