Re: Line ending with Gary"^M on UNIX

2006-12-14 Thread Dr.Ruud
Eugene Kosov schreef: > Oleg V. Volkov: >> Ron Wingfield: >>> while (defined($line = )) { >>>$line =~ s/\r//g; >>>printf OUTFILEHANDLE ("%s"), $line; >>> } >> >> Why not this one? >> $line =~ s/\r$//; >> >> I didn't see anything about removing ^M anywhere in original >> post, only

Re: Line ending with Gary"^M on UNIX

2006-12-14 Thread Eugene Kosov
Oleg V. Volkov wrote: "Ron Wingfield" <[EMAIL PROTECTED]> wrote: [skip] while (defined($line = )) { $line =~ s/\r//g; printf OUTFILEHANDLE ("%s"), $line; } Why not this one? $line =~ s/\r$//; I didn't see anything about removing ^M anywhere in original post, only at end of line

Re: Line ending with Gary"^M on UNIX

2006-12-13 Thread Oleg V. Volkov
"Ron Wingfield" <[EMAIL PROTECTED]> wrote: [skip] > while (defined($line = )) { >$line =~ s/\r//g; >printf OUTFILEHANDLE ("%s"), $line; > } Why not this one? $line =~ s/\r$//; I didn't see anything about removing ^M anywhere in original post, only at end of line. -- Oleg "Rowaa

Re: Line ending with Gary"^M on UNIX

2006-12-08 Thread Xavier Noria
This article explains how this works and has this and other tricks: http://www.onlamp.com/pub/a/onlamp/2006/08/17/understanding- newlines.html -- fxn PS: I am in fact the author but that is irrelevant. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PR

RE: Line ending with Gary"^M on UNIX

2006-12-08 Thread Moon, John
Thank you to all... jwm -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Line ending with Gary"^M on UNIX

2006-12-07 Thread Omega -1911
On 12/7/06, Moon, John <[EMAIL PROTECTED]> wrote: Can someone please give me the octal values or a method of removing ^M from the end of an input line, if present? Try this: $input =~ s/\cM//g;

Re: Line ending with Gary"^M on UNIX

2006-12-07 Thread Ron Wingfield
From: "Moon, John" <[EMAIL PROTECTED]> To: "beginners perl" Sent: Thursday, December 07, 2006 5:19 PM Subject: Line ending with Gary"^M on UNIX Can someone please give me the octal values or a method of removing ^M from the end of an input line, if present? T

Re: Line ending with Gary"^M on UNIX

2006-12-07 Thread Ron Smith
--- "Moon, John" <[EMAIL PROTECTED]> wrote: > Can someone please give me the octal values or a > method of removing ^M > from the end of an input line, if present? > > Thank you in advance > > jwm > > -- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL

Re: Line ending with Gary"^M on UNIX

2006-12-07 Thread John W. Krahn
Moon, John wrote: > Can someone please give me the octal values or a method of removing ^M > from the end of an input line, if present? You could use the dos2unix command: dos2unix yourfile And if you want to do it with Perl: perl -i -pe'y/\cM//d' yourfile John -- Perl isn't a toolbox, but

Line ending with Gary"^M on UNIX

2006-12-07 Thread Moon, John
Can someone please give me the octal values or a method of removing ^M from the end of an input line, if present? Thank you in advance jwm -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]