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 22:38
Subject:
Re: [ID 19991118.014] Error producing ^\ (chr 28) with "\c\\"
Message ID:
D34N4gzkga7M092yn@efn.org
In article <199911210533.AAA01763@monk.mps.ohio-state.edu>,
Ilya Zakharevich <ilya@math.ohio-state.edu> wrote:
>Yitzchak Scott-Thoennes writes:
>> [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.
>
>Then read the docs.

Thank you, I already did when you gave the doc reference before.

I realise that this behavior is perfectly in accord with perlop/"Gory
details"/"Finding the end".  That doesn't mean it's not a bug.  It
just means that if it is a code bug it is also a doc bug.

IMO, it also contradicts the beginning of perlop/"Gory details":
>       When presented with something which may have several
>       different interpretations, Perl uses the principle DWIM
>       (expanded to Do What I Mean - not what I wrote) to pick up
>       the most probable interpretation of the source.

A: "\c\"
B: "\c\"more string here"

The question is, is the current incomprehesible behavior of string B
more important to maintain than following DWIM for "string" A?

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