in reply to Re^2: Sending file data to a browser
in thread Sending file data to a browser

You can make the number of bytes read in a read to whatever size suits you. It's a balancing act between making system calls (expensive in time) vs how much data to extract at a time (expensive in memory). Anything will work, from one byte to a million (or even more), the last read will only partially fill the buffer anyway.

Have a look at perldoc -f read for more details on the read function.

On another note, it is interesting to see that Microsoft Internet Explorer for Windows XP refuses to allow one to download a file if the cached parameter is set on the server. Why this is so confuses the blazes out of me. It's not the only thing that Microsoft have $!@#ed up in the latest version of IE. Seriously, who are the complete $!#@heads that work for Microsoft?? Either dumb or seriously seriously selfish $!#@s.

Replies are listed 'Best First'.
Re^4: Sending file data to a browser
by cosmicperl (Chaplain) on Dec 06, 2005 at 04:22 UTC
    What is the header text for the nocache header? I'm using plain old print not $r. Thanks in advance