in reply to Problem w/ single-quoted strings
OK, first off, I'm a bit confused, because your first line says 'Testing\z'. Perhaps you meant 'Testing\n' ?
With that out of the way, you are missing something -- or rather, the document you just quoted is missing something.
It handles three cases:
- Any character OTHER than a backslash or termination character is inserted literally. (The termination character is normally ' but may differ if q// is used.)
- Any backslash followed by the termination character inserts the termination character.
- Any backslash followed by a backslash inserts a backslash.
- Any backslash followed by a character OTHER than the termination character or a backslash inserts a backslash and that literal character.
$foo = 'C:\\'; # if you had 'C:\' then the ' would instead be escaped +instead of ending the string.
--Stevie-O
$"=$,,$_=q>|\p4<6 8p<M/_|<('=> .q>.<4-KI<l|2$<6%s!<qn#F<>;$, .=pack'N*',"@{[unpack'C*',$_] }"for split/</;$_=$,,y[A-Z a-z] {}cd;print lc
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Problem w/ single-quoted strings
by eweibust (Initiate) on May 14, 2004 at 18:23 UTC |
In Section
Seekers of Perl Wisdom