develooper Front page | perl.perl5.porters | Postings from November 2000

Re: [ID 20001130.012] Can't do '\'?

Thread Previous | Thread Next
From:
Ronald J Kimball
Date:
November 30, 2000 13:21
Subject:
Re: [ID 20001130.012] Can't do '\'?
Message ID:
20001130161945.D137295@linguist.dartmouth.edu
On Thu, Nov 30, 2000 at 04:11:38PM -0500, WWW server user wrote:
> A _very_ simple perl program:
> 
>    print '\';
> 
> causes
>    "Can't find string terminator "'" anywhere before EOF at blah line 1."

That is the correct behavior.  The backslash escapes the second quote, so
you are missing the terminating quote.

Perhaps you meant to escape the backslash?

print '\\';

Ronald

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