develooper Front page | perl.perl6.language.data | Postings from September 2000

Re: RFC 328 (v1) Single quotes don't interpolate \' and \\

Thread Previous
From:
Nicholas Clark
Date:
September 29, 2000 02:53
Subject:
Re: RFC 328 (v1) Single quotes don't interpolate \' and \\
Message ID:
20000929105325.A51277@plum.flirble.org
On Thu, Sep 28, 2000 at 05:48:25PM -0500, David L. Nicol wrote:
> 
> I don't like it, and here's why:
> 
> > currently single quoted here docs don't interpolate C<\\> or C<\'>.
> 
> 
> We already have a way to read in arbitrary literals.  I _like_ the
> fact that C<q> allows backslash to be used to allow including the delimiter.
> 
> It works for any delimiter, too, not just single-quote.

As you say, it works for the delimiter(s), not for single-quote. If single
quote isn't the delimiter it gets no special treatment

$  perl -lwe "print q(Quoted \( \\ \) Not \' \t \z)"
Quoted ( \ ) Not \' \t \z


I feel this current behaviour is potentially confusing.
On the other hand changing what we have is confusing to those who already
know it.

Nicholas Clark


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About