in reply to Re: Re: detecting carraige returns
in thread detecting carraige returns
"Newline" (which might be what you meant but didn't know you meant) is "\n". It is the control character which means to move your cursor (or, etc.) down one line.
Er, not quite. "Newline" is a sequence of characters that signify the end of one logical line and the beginning of another. That sequence is represented by "\n" in perl. The character that means "move your cursor to the next line" is a line feed which is ASCII ordinal 10. (Often you will see it represented in hexadecimal (x0A) or octal (012)) See the section on newlines in perlport
What you say about "Enter" is essentially what is true about "\n". Just replace everywhere you have "\n" with "\012" or "\x0A" or even the text "line feed character".
|
|---|