sw has asked for the wisdom of the Perl Monks concerning the following question:
Hi all,
I'm seeing something very unusual. Here's the scenario: I've wrote a script to read 2 files, and write stuff from them to the 3rd file
I found out that if I copied the lines from the files completely without editing them, it works fine, the ^M doesnt appear at the back of the new file, however, if I add a "\n" at one or 2 lines for the new file, the ^M appears at the back of each line in the new file. Is there something that I'm not doing right?
When I did
print NEW_FILE "`$Lines_from_old_files`;";the ^M doesnt appear anywhere. But if I did
print NEW_FILE "`$Lines_from_old_files`;\n";the ^M appears everywhere
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Bad interpreters coming out
by GrandFather (Saint) on Apr 06, 2011 at 08:12 UTC | |
by sw (Initiate) on Apr 06, 2011 at 08:32 UTC | |
by GrandFather (Saint) on Apr 06, 2011 at 09:33 UTC | |
|
Re: Bad interpreters coming out
by elef (Friar) on Apr 06, 2011 at 10:03 UTC | |
by cdarke (Prior) on Apr 06, 2011 at 11:27 UTC | |
|
Re: Bad interpreters coming out
by anonymized user 468275 (Curate) on Apr 06, 2011 at 11:38 UTC |