Yesterday kindly Monks gave some very useful advice about how to find out what ALL the characters were in a text file.It was all part of my efforts to write UNIX files on a Windows based PC.
The next job is to write the UNIX text file (to be created by reading in a Windows file and writing out each line.
Therefore in the print statement I used \012 at the end of the line rather than the usual \n.I even added binmode to the input and output files. The Perl extract is below.
I then processed this with the code that looked at each character in the line (having set the input file handle using binmode).I found both ASCII 13 and ASCII 10. I was hoping to find just ASCII 10!
I then found that without the \012 I still got an ASCII 13 character at the end of each input line.
How do I stop print giving me the ASCII 13 character at the end of each line?