FixNEthing has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to print a chr(10) to a binary file, but it prints 13 10 instead. Is there any around this ? I'm writing and testing on a windows platform, but the program is for a cgi-bin on linux.
  • Comment on printing chr(10) to a file also adds chr(13)

Replies are listed 'Best First'.
Re (tilly) 1: printing chr(10) to a file also adds chr(13)
by tilly (Archbishop) on Jul 15, 2001 at 09:19 UTC
    On Windows binmode will do the trick. You will not have the problem on Linux because Linux does not have a distinction between binary and text files.