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

Re: [ID 19991118.014] Error producing ^\ (chr 28) with "\c\\"

Thread Previous | Thread Next
November 25, 1999 02:00
Re: [ID 19991118.014] Error producing ^\ (chr 28) with "\c\\"
Message ID:
Philip Newton (lists.p5p):
>OK. I see what you mean now. No, I suppose I don't want that. I suppose
>what I want was expressed, more or less, by Yitzchak Scott-Thoennes
>elsewhere in this thread. Something along the lines of having \-conversion
>(\n \f etc.) done in parallel with \c-conversion, and having \c\ do
>roughly the same thing as \c if the following character is either a
>backslash or the closing delimiter, e.g. "\c\\", "\c\"", qq^\c\^^.

This now makes sense, and that's roughly how I had thunk it should go.
At least this way is relatively easy to implement: special-case
\c\[something] then fall back to parsing from \c if there wasn't a
following backslash - that way we could get it all in one left-right
pass, which seems the most intuitive, even if it isn't. 

It strikes me as being the solution most mentally compatible with the
rest of Perl's escaping/metacharactering. Feel free to violently

To save someone the bother of bringing up the degenerate case, what the
heck should \c\cx do?

Q:  How many IBM CPU's does it take to execute a job?
A:  Four; three to hold it down, and one to rip its head off.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About