While trying to condense some problem code into a small enough example to post, without removing so much information that the problem became unclear, I realized it would be really nice to have a 'hidden code' tag to go along with the code tag. This would allow the discussion to include only the relevant parts of the code, but let you include supporting code that would be visible when you hit 'd/l code'. This way you could get a complete, working test script from 'd/l code', without cluttering up the conversation with supporting code. What I'm envisioning is something like this:
<hidden_code>
#!/usr/bin/perl -w
use strict;
... several other 'use' statements.
</hidden_code>
<code>
# I think the fake code problem is here:
some_sub('blah blah blah');
sub some_sub {
do_something();
&nbsl;do_something_else();
}
</code>
<hidden_code>
sub supporting_sub1 { ... code ... }
sub supporting_sub2 { ... code ... }
</hidden_code>
Good idea? Or is it time to stop drinking?
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.