Try the following:
my $file; open($file,"<test.txt") or die "urg: $!"; while ($bytes = read($file,$buffer,1024)) { $bytesread+=$bytes; print OUTFILE $buffer; } close(OUTFILE); close($file);
Also, $filename is probably being set by calling $filename = CGI::param('upload_file_field'); which returns a variable that acts as both a string and a filehandle. As for why it doesn't work for IE, we would need to know the version of IE and platform (if it's Mac and IE4.x, there's a known issue with uploading files...but I don't recall much beyond that) before we begin beating ourselves in the head over this. Since it works with other browsers, the problem seems to be with the version of IE.
antirice
The first rule of Perl club is - use Perl
The ith rule of Perl club is - follow rule i - 1 for i > 1
In reply to Re: Re: file upload
by antirice
in thread file upload
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |