If you must specify file contents with an exact byte sequence, use literal octal or hexadecimal notations, and not the semantic names like \n or \r. The semantic names are subject to translations according to platform-specific encoding features. Binmode your filehandle to ensure no translations occur outside of your control.
For example, binmode(OUTPUT); print OUTPUT "Hello\x0D\x0A" ensures a carriage-return and newline on all platforms. Conversely, dropping the \x0D part will ensure there's no carriage return (which appears as ^M in some editors).
--
[ e d @ h a l l e y . c c ]
In reply to Re: Line Feeds
by halley
in thread Line Feeds
by mikevanhoff
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |