I looked around for a while but couldn't find the answer to this question. I was showing my mom (a brilliant woman with a PhD who is scared of programming) a script I was writing. I was explaing to her how I could match and replace with regexes and such, and showed her an output like this:
This is
sample code
with a
tab in it.
this line is preceded by a \n
So she was sort of catching on, and then she asked me how I can tell by looking at an input sample whether I'm looking at a tab character or whitespace or what. I sort of dodged the question by saying that the computer knows what is what, but the fact is I didn't know. So now my question to the monks:
Is there any editor/emacs mode/etc such that I can view an input or output sample that actually shows, say, \t instead of actually tabbing. Does that explanation make sense? I mean, I'd like to be able to look at a paragraph or whatever without having to resort to octal or something but still be able to see what's what in terms of metachars and such. Is there an easy way to do this? If this has already been addressed somewhere, please point the way and accept my apology. Thanks Monks!
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.