develooper Front page | | Postings from September 2000

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

Thread Previous
Nicholas Clark
September 29, 2000 02:53
Re: RFC 328 (v1) Single quotes don't interpolate \' and \\
Message ID:
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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About