develooper Front page | perl.perl5.porters | Postings from November 1999

Re: [ID 19991118.014] Error producing ^\ (chr 28) with "\c\\"

Thread Previous | Thread Next
From:
Ilya Zakharevich
Date:
November 24, 1999 08:35
Subject:
Re: [ID 19991118.014] Error producing ^\ (chr 28) with "\c\\"
Message ID:
19991124113547.A3218@monk.mps.ohio-state.edu
On Wed, Nov 24, 1999 at 03:10:58AM -0500, Philip Newton wrote:
> > > > So you want it to be parsed left-to-right.  But you want \c\\ to be
> > > > parsed right-to-left.  Choose one.
> > > 
> > > Not quite. I want '\\' to be translated to \ in a previous pass, before
> > > the \c mechanism sees it. After the '\\' -> \ pass, I want left-to-right.
> > 
> > Then you are advising that "\\nc" and "\cc" should be parsed the same, right?

It should have been, of course, \\cc vs \cc

> 
> I don't get it. The first I would parse as three characters: backslash
> (the two backslashes become one), n, c. The second as one character:
> ctrl-C ("\x03").

Nope.  You want two backslashes converted to one *before* \c
interpolation is done.  This \\cc will behave the same as \cc.

Ilya

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About