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

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

Thread Previous | Thread Next
Philip Newton
November 26, 1999 03:38
Re: [ID 19991118.014] Error producing ^\ (chr 28) with "\c\\"
Message ID:
On Fri, 26 Nov 1999, Ilya Zakharevich wrote:

> On Thu, Nov 25, 1999 at 04:55:59AM -0500, Philip Newton wrote:
> > Something along the lines of having \-conversion
> > (\n \f etc.) done in parallel with \c-conversion, and having \c\ do
> > roughly the same thing as \c if the following character is either a
> > backslash or the closing delimiter, e.g. "\c\\", "\c\"", qq^\c\^^.
> you are missing the *most important* point again: closing " is found first.

Yes, but according to perlop/Gory Details, while searching for the closing
" of "" (or closing ^ of qq^^, etc.), the combinations \\ and \" (or \^,
etc.) are skipped. Hence, according to my understanding, "\c\\" (after the
first "pass", finding the end) turns into >>\c\\ inside ""<<; "\c\"" into
>>\c\" inside ""<<; and qq^\c\^^ into >>\c\^ inside qq^^<<.

After this, backslash+delimiter are turned into plain delimiter (while
backslash+backslash is kept), and knowledge of the original delimiter is 
lost, so the three strings become \c\\, \c" and \c^, respectively.

Hmmm, I think I begin to understand. No change is needed for
control-(closing delimiter), since the interpolation step doesn't see
backslashes there any more. However, I still believe that handling of \c\\
should be changed to produce ctrl-\ instead of ctrl-\, \.

Philip Newton <>

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About