On Fri, 19 Nov 1999, Ilya Zakharevich wrote: > On Fri, Nov 19, 1999 at 11:17:03AM -0500, Philip Newton wrote: > > > And what would "\c\c\c\c\\" do, in your opinion? ;-) > > > > My guess is ^\ + 'c' + ^\ + 'c' + '\\', i.e. ASCII 28, 99, 28, 99, 92. And > > that's what Perl does. > > So you want it to be parsed left-to-right. But you want \c\\ to be > parsed right-to-left. Choose one. Not quite. I want '\\' to be translated to \ in a previous pass, before the \c mechanism sees it. After the '\\' -> \ pass, I want left-to-right. > > This still doesn't explain to me, though, hough to produce a string > > consisting solely of the character ^\. > > TIMTOWTDI. chr(ord('\\')-62) (or is it 32?) is one of them. Well, and "\0x1c" and "\034" work, of course. I was just disappointed that ctrl-\ seems to be the only character that's difficult to produce in \c notation. Cheers, PhilipThread Previous | Thread Next