This makes sense to me as a self-documenting code practice (documenting what intent the programmer had when sending that newline to a file). However, I'd like to note that it won't fix the problem since, just like "\n" is silently turned into "\r\n" under Windows, "\cJ" will silently be turned into "\cM\cJ", since these are identical strings under Win32 (and most Perl platforms). In MacOS, "\n" is "\cM" and "\r" is "\cJ".
- tye (but my friends call me "Tye")In reply to (tye)Re2: printing \n to a file
by tye
in thread printing \n to a file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |