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:
sthoenna
Date:
November 20, 1999 21:24
Subject:
Re: [ID 19991118.014] Error producing ^\ (chr 28) with "\c\\"
Message ID:
Y92N4gzkgKYT092yn@efn.org
In article <19991119124913.F20768@monk.mps.ohio-state.edu>,
Ilya Zakharevich <ilya@math.ohio-state.edu> wrote:
>On Fri, Nov 19, 1999 at 11:17:03AM -0500, Philip Newton wrote:
>> > 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.
>
>So you want it to be parsed kleft-to-right.  But you want \c\\ to be
>parsed right-to-left.  Choose one.

He stated he expected either "\c\\" or "\c\" to produce chr(28) and
found that neither of them did.  He then said that in his opinion
"\c\\" should do it.  I infer that what he *wants* is for either of
them to do it.

[D:\susv2]perl -wlne "eval $_; print $@ if $@"
print length "\c\\"
2
print length "\c\"
Can't find string terminator '"' anywhere before EOF at (eval 2) line 1, <> chunk 2.
exit

I lean toward considering the second of these a bug.

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