Hi,
I call a script from a Web page, this Perl script is located in Linux server. I experience an issue when I try to upload a file from a Windows station to this server. The file is uploaded well, but the first line is missing. I tried with a lot of files and all of files don't contain the first line.
Can someone help me to fix this issue?
Here is a part of the script:
===============
my $br=0;
my $s=0;
my $buffer=0;
$fpath=$q->param('uploadfile');
open(BWF,">$writefile");
while ($br=read($fpath,$buffer,2096))
{
$s += $br;
binmode BWF;
print BWF $buffer;
}
close(BWF);
I call a script from a Web page, this Perl script is located in Linux server. I experience an issue when I try to upload a file from a Windows station to this server. The file is uploaded well, but the first line is missing. I tried with a lot of files and all of files don't contain the first line.
Can someone help me to fix this issue?
Here is a part of the script:
===============
my $br=0;
my $s=0;
my $buffer=0;
$fpath=$q->param('uploadfile');
open(BWF,">$writefile");
while ($br=read($fpath,$buffer,2096))
{
$s += $br;
binmode BWF;
print BWF $buffer;
}
close(BWF);