On Thu, Dec 05, 2002 at 07:54:09PM +0200, arcadi shehter wrote:
> my take : 
> 
> non interpolating construct is a sequence of characters enclosed in
> delimiters for which perl switch off *any* perl-programm-like
> interpretation of the content.  since perl have to find the end of
> this "I-am-not-looking" phase , the delimiter itself have to appear inside the
> string prefixed by backslash "\" and since now "\" itself acquire
> special "assignment" , if it is meant to be part of the string it have to
> appear backslash-prefixed "\\" itself. In principle *any* character can be
> backslashed *inside* the string , but only for delimiter and the
> backslash this is absolutely necessary. 
> 
> in this sence interpolated string is "language inside language" . 
> hence : 
>  * some characters ( or words ) have to be "reserved in the inner
>    language in order for outer language to know where the inner
>    language text stops.
>  * this is achieved by chosing a prefix , and any character from outer
>    language is represented in the inner languge by the same character
>    with prefix - two character sequance 
>  * for all *except* two characters -- the delimiter and the prefix --
>    we can make syntactic sugar of making the character to "mean"
>    itself .
> 
> 
> 
> 
>     '\ \ \h\e\l\l\o\ \ '
> 
> '\'\\\ \\\ \\\h\\\e\\\l\\\l\\\o\\\ \\\ \''

This is wrong.  '\ \ \h\e\l\l\o\ \ ' gives you a string with nine
backslashes.

andrew
-- 
Capricorn: (Dec. 22 - Jan. 19)
After all is said and done, no one will have said or done anything
involving you in any way.

Attachment: msg24955/pgp00000.pgp
Description: PGP signature

Reply via email to