Ed Avis <[EMAIL PROTECTED]> writes: > As Robert Eden mentioned it looks like the file corruption was caused > caused by getprint() translating line endings or forcing ASCII mode > (not sure which). > > I'm not sure it is a good idea for getprint() to translate line > endings without asking - after all it seems fairly unrelated to the > main task of downloading - but if you think the current behaviour is > correct it should be documented. Something like > > getprint($url) > Get and print a document identified by a URL. The document > is printed to STDOUT as data is received from the > network. The document is treated as text (rather than > binary) so line endings and the like may be converted. > > I hope that you can make these two documentation changes.
All getprint() does is to print the data it fetches on STDOUT as is. The text/binary distinction is a property of the file handle itself. You might want to apply binmode(STDOUT) before calling getprint(). Regards, Gisle
