in reply to Re: How to send a file vith apache?
in thread How to send a file vith apache?
That works, but I don't like the use of the <> diamond operator to deal with binary files. If there aren't any newline characters in the file, you'll read it all in one go; if there are many of them you'll read a line and print it many times.
I think it's better to use the simple read function for this:
while (read(INP,$buf,8192)) { print $buf; }
Much more predictable behavior.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: How to send a file vith apache?
by matija (Priest) on May 01, 2004 at 17:36 UTC | |
by sgifford (Prior) on May 01, 2004 at 20:27 UTC |