Hi,
I call a script from a Web page to download a file, this Perl script and these files to download are located in Linux server. I can download a text file on Windows station but when I opened it, it contained one line instead many lines, the end paragraph is remplaced by a small square (end line and not end of paragraph). If I try to open it from the Linux server via a Linux command as "cat test.txt", the file will be OK. I think that it is related to my Perl script (see below).
Can someone help me to fix this issue?
Thanks
======================
open(BFILE, '<', "$file") or return(0);
print $q->header(-type => 'application/x-download',
-attachment => "$file",
'Content-length' => -s "$file"
);
binmode BFILE;
print while <BFILE>;
close (BFILE);
I call a script from a Web page to download a file, this Perl script and these files to download are located in Linux server. I can download a text file on Windows station but when I opened it, it contained one line instead many lines, the end paragraph is remplaced by a small square (end line and not end of paragraph). If I try to open it from the Linux server via a Linux command as "cat test.txt", the file will be OK. I think that it is related to my Perl script (see below).
Can someone help me to fix this issue?
Thanks
======================
open(BFILE, '<', "$file") or return(0);
print $q->header(-type => 'application/x-download',
-attachment => "$file",
'Content-length' => -s "$file"
);
binmode BFILE;
print while <BFILE>;
close (BFILE);