> -----Original Message-----
> From: Gary Stainburn [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 20, 2002 12:11 PM
> To: Bob Showalter; [EMAIL PROTECTED]
> Subject: Re: cat binary file
> 
> ...
> The point was that I was doing this at the end of a quite 
> long perl script, 
> and wanted to do it from within that script. The alternative of using 
> system() to call cat would have been inefficient and would 
> may had buffering 
> problems too.

OK, I see now. In that case, look at sysopen() and sysread(). That
will let you read fixed-size chunks of the file with no buffering.
Then just print() each chunk to send it back to the browser.

Remember that Content-type and Content-disposition headers will control
how the browser interprets the file coming back.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to