The first wouldn't work very well if the person wanted to
have two pieces of code. Something like this might be
intended:
I see this in a book:
for (keys %hash) {
print;
}
But when I do it like this, it doesn't work
for (key %thisisnotintendedasaseriousquestion) {
print;
}
What's wrong?
It would be rendered something like (case second box):
I see this in a book:
But when I do it like this, it doesn't work
Code:
for (keys %hash) {
print;
}
for (key %somename) {
print;
}
I'm imagining that the '
Code:' is
added automatically. Having code on by default would
give something which is somewhat hard to read, for
example (case all preformatted):
I see this in a book:
for (keys %hash) {
print;
}
But it doesn't work in my example, please
<a href="www.somedomain.com/dev/null>look at it here!</a>
Yet I agree that something should be done... Perhaps
information on how to display code and escape characters
could be at the top of the page before the submission
box on the
Seekers of Perl Wisdom section only, in
hopes that it will be read? (I don't think I'd like
seeing it there, so don't consider me in favor of my
own suggestion!)
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.