We still need to verify whether we can have, in qq strings:
\033 - octal (p5; deprecated but allowed in p6?)
\o33 - octal (p5)
\x1b - hex (p5)
\d123 - decimal (?)
\b1001 - binary (?)
and if so, if these are allowed too:
\o{777} - (?)
\x{1b} - "wide" hex (p5)
\d{123} - (?)
\b{1001} - (?)
Only four of these nine constructs are allowed in Perl5.
Note that \b conflicts with backspace. I'd rather keep backspace than
binary, personally; I have yet to feel the need to call out a char in
binary. :-) Or we can make it dependent on the trailing digits, or
require the brackets, or require backspace to be spelt differently.
But I think we'd definitely like to introduce \d.
There is also the question of what the bracketed format does. "Wide"
chars, e.g. for Unicode, seem appropriate only in hex. But it would
seem useful to allow a bracketed form for the others that prevents
ambiguities:
"\o164" ne "\o{16}4"
"\d100" ne "\d{10}0"
Whether that means you can actually specify wide chars in \o, \d, and
\b or it's just a disambiguification of the Latin-1 case is open to
question.
MikeL
*Not to be confused with an eigendisambiguification, of course.
- Re: String Literals, take 2 James Mastros
- Re: String Literals, take 2 Luke Palmer
- Re: Usage of \[oxdb] (was Re: String Literals, ta... Michael Lazzaro
- Re: Usage of \[oxdb] (was Re: String Literals... Dave Whipp
- Re: Usage of \[oxdb] Michael Lazzaro
- Re: Usage of \[oxdb] (was Re: String Literals... Larry Wall
- Re: Usage of \[oxdb] (was Re: String Lite... Damian Conway
- Re: Usage of \[oxdb] Michael Lazzaro
- Re: Usage of \[oxdb] (was Re: String Lite... James Mastros
- Re: Usage of \[oxdb] (was Re: String... Michael Lazzaro
- Re: Usage of \[oxdb] (was Re: St... Larry Wall
- Re: Usage of \[oxdb] (was Re: St... James Mastros
- Re: String Literals, take 2 Larry Wall