What you probably want to do is read the file NOT in binmode. If there are CRLFs, they'll get compacted and chomped as normal.
Writing out, you want to put it in binmode so you get exactly the bytes you specify, and don't have your line endings re-expanded for you.
In reply to Re^3: Writing a UNIX text line - the end character challenge
by SuicideJunkie
in thread Writing a UNIX text line - the end character challenge
by merrymonk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |