Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

How many time have you been working on some code and wanted to comment out a section of it to test specific code components?


q{ ...; ...; };
Perl will optimize this away, so there's no execution speed involved. Probably the best thing about this is that many color highlighting editors will mark this as a string (which it is), so you can see that it's something not-normal. BEGIN blocks are not BEGIN blocks anymore, they are just part of the never-executed string. It doesn't do any syntax checking (well, you do have to balance your {}'s, or have to choose other delimiters).

Update (Aug 15 2002):

15:07 <@kane_> juerd: it looks elegant, but wanrs =) 15:07 <@Juerd> kane_: I know, but it's perfect for development code. T +he warning is a good reminder, too 15:08 <@Juerd> I can't believe I didn't say anything about warnings in + that post... 15:12 <@Juerd> kane_: Hmmm... use Acme::Comment qw/start q{ end };/ wo +uld work, wouldn't it? :)

- Yes, I reinvent wheels.
- Spam: Visit eurotraQ.

In reply to Re: Acme::Don't by Juerd
in thread Acme::Don't by rob_au

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • 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, 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
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others pondering the Monastery: (7)
    As of 2020-08-05 11:16 GMT
    Find Nodes?
      Voting Booth?
      Which rocket would you take to Mars?

      Results (35 votes). Check out past polls.