You can do that setting the file to "binary mode". I suggest you go look for binmode() in a "perldoc perlfunc" if you're using traditional filehandles.
What happens is that "text" files in Win32 need to have its lines terminated in "\r\n", so a translation happens for/against you in the background whenever you write a text file. If you do not need this, simply declare your file to be binary as explained before. This will get rid of the extraneous "\r".
Good luck.
In reply to Re: dos2unix problem
by fokat
in thread dos2unix problem
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |