Actually I have 3 questions, 2 technically related, and one on how to be NICE on this message system
First a quick history lesson:
Once a long long time ago (You guys guess my age) a newline “\n” was considered a LineFeed (0x0A). Then Selectric typewriters, and soon after dot matrices printers appeared which also needed a command to send the print ball/head to location zero, so some systems redefined the newline to be a LineFeed followed by a CarriageReturn ( 0x0A + 0x0D ). Someone quickly figured out that it took a lot longer for the ball/print head to move to location zero, then it did to move the paper up one line, so they reversed the chars, issuing the CarriageReturn first and the LineFeed second (0x0D + 0x0A )… and finally someone decide to save space and just send a CarriageReturn char (0x0D) and assume the LineFeed. So now theirs a real mishmash of ideas describing what a newline should be.
The 1st Question:
What does Perl think a newline should be?
Dose Perl decide? Does it depend on the ‘C’ compiler used to create Perl? Maybe it depends on what the operating system thinks a newline should be? Maybe I can define it, so I can pick what a newline should look like.
The 2nd Question:
How does chomp() handle newlines.
Will chomp() remove all forms of newline, or only the exact char or char sequence specified by “\n” ?
The 3rd Question:
A while ago I posted a couple of question and quickly received good accurate answers that I put to use … and forgot about the question. I came back to the board weeks latter and found that people had continued to respond to my question long after I solved the problem. Is there a way to flag the message as already answered/solved? I hate seeing people waist their time solving my already answered questions ?
Edited 2005-01-05 by Ovid
20050111 Edit by castaway: Changed title from '3 questions... 2 technically related, and one on how to be NICE'
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
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:
Outside of code tags, you may need to use entities for some characters:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||