Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Perl Beginners Cgi > Re: Help on rea...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 5 Topic 1403 of 1496
Post > Topic >>

Re: Help on reading esc sequence

by mritty@[EMAIL PROTECTED] (Paul Lalli) Jun 11, 2007 at 10:55 AM

On Jun 11, 11:05 am, tig...@[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 im****tant.  The first one is four characters
long - slash, e, slash, n.  The second one is two characters long:
escape, newline.

Paul Lalli
 




 5 Posts in Topic:
Help on reading esc sequence
amritaroy2005@[EMAIL PROT  2007-06-11 18:53:26 
Re: Help on reading esc sequence
susheelm@[EMAIL PROTECTED  2007-06-11 19:34:32 
Re: Help on reading esc sequence
tigger@[EMAIL PROTECTED]   2007-06-11 10:05:08 
Re: Help on reading esc sequence
mritty@[EMAIL PROTECTED]   2007-06-11 07:52:51 
Re: Help on reading esc sequence
mritty@[EMAIL PROTECTED]   2007-06-11 10:55:56 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 11:53:52 CST 2008.