in reply to Re^2: CRC Error on ZIP Files
in thread CRC Error on ZIP Files
print "@data";This is your problem. Consider this code:
You wanted to print your lines joined by empty string, but "@array" joins array elements with space (read $" for more info on that). Your original, commented-out approach is better: just read your file by, say, 10 kilobytes and immediately send the data to client:$ perl -E'@a=qw/1 2 3/; print "@a"' 1 2 3
In this example I tell Perl to read files with diamond operator (<$filehandle>) by 10240 bytes ($/) and loop printing the file pieces until I reach end-of-file. Edit: corrected typo{ local $/ = \10240; print while <$peunter>; }
|
|---|