Re: Help on reading esc sequence

[email protected] (Paul Lalli)
Newsgroups perl.beginners.cgi
Organization http://groups.google.com
Message-ID <[email protected]>
On Jun 11, 11:05 am, [email protected] (Paul Archer) wrote:
> The reason this works is that when you read from STDIN, you are getting the
> newline from when the user of the program hits return. Using '=~' is
> implying a 'match', which will match the string/regexp supplied within the
> variable's value. 'eq' means the two strings have to be exactly equal to
> each other, but your variable actually has the value of '\e\n'.

This may sound pedantic, but I mention it because it's exactly the
same error the OP made.  The value is NOT '\e\n'.  The value is "\e
\n".  The distinction is important.  The first one is four characters
long - slash, e, slash, n.  The second one is two characters long:
escape, newline.

Paul Lalli
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.