Within a transliteration, the first ten of these sequences may be used.
\t tab (HT, TAB) \n newline (NL) may not be carrage return + line feed. \r return (CR) may not be the ascii carrage return \f form feed (FF) \b backspace (BS) \a alarm (bell) (BEL) \e escape (ESC) \0oo oo=octal ASCII char value e.g. form feed (\f) is \014 \xhh hh=hex ASCII char value e.g. form feed (\f) is \x0C \c[ [=control char e.g. form feed (\f) is \cL \l lowercase next char \u uppercase next char \L lowercase till \E \U uppercase till \E \E end case modification \Q quote non-word characters till \E
If use locale is in effect, the case map used by \l, \L, \u and \U is taken from the current locale. See the perllocale manpage.
All systems use the virtual "\n" to represent a line terminator, called a "newline''. There is no such thing as an unvarying, physical newline character. It is an illusion that the operating system, device drivers, C libraries, and Perl all conspire to preserve. Not all systems read "\r" as ASCII CR and "\n" as ASCII LF. For example, on a Mac, these are reversed, and on systems without line terminator, printing "\n" may emit no actual data. In general, use "\n" when you mean a ``newline'' for your system, but use the literal ASCII when you need an exact character. For example, most networking protocols expect and prefer a CR+LF ( "\012\015" or "\cJ\cM") for line terminators, and although they often accept just "\012", they seldom tolerate just "\015". If you get in the habit of using "\n" for networking, you may be burned some day.
|file: /Techref/language/perl/litesc.htm, 2KB, , updated: 2009/4/27 20:15, local time: 2019/6/27 04:27,
|©2019 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?|
<A HREF="http://techref.massmind.org/techref/language/perl/litesc.htm"> Perl Escape Characters</A>
|Did you find what you needed?|
Welcome to massmind.org!
Welcome to techref.massmind.org!