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:
Philip Newton
Date:
November 19, 1999 07:29
Subject:
Re: [ID 19991118.014] Error producing ^\ (chr 28) with "\c\\"
Message ID:
Pine.LNX.4.04.9911191103110.6115-100000@ficus.frogspace.net
(cc'ed to Ilya Zakharevich)

On Fri, 19 Nov 1999, Ilya Zakharevich wrote:

> ,,, writes:
> > "\c\\" whould be the correct syntax in my opinion; however, it appears
> > that the \c logic sees two backslashes -- that the two backslashes
> > aren't first reduced to one (as per double-quoting usually) before \c
> > sees it.
> 
> And what would "\c\c\c\c\\" do, in your opinion? ;-)

My guess is ^\ + 'c' + ^\ + 'c' + '\\', i.e. ASCII 28, 99, 28, 99, 92. And
that's what Perl does.

This still doesn't explain to me, though, hough to produce a string
consisting solely of the character ^\.
-- 
Philip Newton <newton@newton.digitalspace.net>


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