Thanks
merlyn. I knew that my strategy would prevent
saving a file named 'display', but I wasn't aware of the
superior '-' convention. I don't have much experience coding
console apps so bear with me. To preserve the context of the replies i won't update the
logic of my original code, but did include the warnings
you suggested.
Generally, i'm not suggesting that stripping perl comments
is a good idea, because it eliminates very valuable
documentation and optional lines of code, and is a highly
dubious coding situation (parsing perl). However i find it
a useful hack when trying to comprehend heavily commented
cargo. In some cases it can reduce the script size by 50%
and bring the flow of logic into sharper focus.
To future readers of this thread, if you need a perl comment
stripper i recommend upgrading to
danger's more beautiful and efficient version below.
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.