PDA

View Full Version : Escape characters


NAND
Jun 22, 2007, 01:43 AM
While going through someone's program, I came across escape characters "\A" and "\B".
I wanted to know whether this escape characters really exists in perl ?

asterisk_man
Jun 23, 2007, 06:07 AM
Perl Escape Characters (http://html.megalink.com/programmer/pltut/plTabChars.html)

Seems to imply that \a is bell and \b is backspace. Though \A and \B are not noted. Do they seem to do anything?

sfbattles
Jul 2, 2007, 07:58 AM
Escape Sequences \a Beep
\b Backspace
\c "Control" caracter. \cD = CTRL-D
\e Escape
\f Form feed
\l Make the next letter lowercase
\n New line, return.
\r Carriage return.
\t Tab.
\u Make the next letter uppercase
\x Enables hex numbers
\v Vertical tab
\\ Print backslash
\" Print double quotes
\ Escape next character if known otherwise print. Also allows octal numbers.
\L Make all letters lowercase until the \E
\U Make all letters uppercase until the \E
\Q Add a backslash-quote to all the nonalphanumerics until the \E
\E Terminates the effects of \L, \U, or \Q
\007 Any octal ASCII value
\x7f Any hexadecimal value
\cx Control-x
These look to be string pattern match escape sequences

\B - Matches everywhere except between a word character and non-word character
\A - Matches only at the beginning of a string
I have not