|
|
| We don't bite newbies here... much | |
| PerlMonks |
Re^2: Native newline encoding (more liberal)by tye (Cardinal) |
| on May 23, 2012 at 02:52 UTC ( #971931=note: print w/ replies, xml ) | Need Help?? |
|
I much prefer s/\s*$//; because one should never write new code that causes trailing whitespace to be significant. be strict in what you output binmode $fh, '...:crlf'; That seems like something that is quite unlikely to be what one should do. That might make sense when trying to use a Unix system to write a text file that will be used by some MS Windows program(s). For the most common case, you should replace that 'binmode' code with this code: - tye
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||