in reply to Re: Native newline encoding
in thread Native newline encoding
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: