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

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

Thread Previous | Thread Next
Ilya Zakharevich
November 26, 1999 23:24
Re: [ID 19991118.014] Error producing ^\ (chr 28) with "\c\\"
Message ID:
On Fri, Nov 26, 1999 at 07:26:36AM -0500, Philip Newton wrote:
> > 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.

This is how I would expect things work.

> 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-\, \.

This will break compatibility with

   $x = 'whatever';

It is not win-win situation.  Being such, I do not feel any urge to
have it changed.


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