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: 2018/9/23 15:54,
|©2018 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://www.piclist.com/techref/language/perl/litesc.htm"> Perl Escape Characters</A>
|Did you find what you needed?|
PICList 2018 contributors:
o List host: MIT, Site host massmind.org, Top posters @20180923 RussellMc, Van Horn, David, Sean Breheny, David C Brown, Bob Blick, Isaac M. Bavaresco, Neil, Denny Esterline, Harold Hallikainen, John Gardner,
* Page Editors: James Newton, David Cary, and YOU!
* Roman Black of Black Robotics donates from sales of Linistep stepper controller kits.
* Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters.
* Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated!
* Contributors: Richard Seriani, Sr.
Welcome to www.piclist.com!