I'm having problems writing records to an output file. When I do it in Textpad running on Windows, the output file looks fine. When, however, I copy the script to a Linux machine and use the exact same code, it appends a ^M character on each line written to the file. I have no idea why this is happening. I'm writing to the file by redirecting STDOUT to it.
open STDOUT,"> ${output}" || die "$0 can't open $ifile";
This is how I'm printing:
print $_;
I'm new to this, so if there's a better way to do it I'm all ears!
Thanks for the help!