How can I comment out a large block of perl code?

Discussion in 'Perl Misc' started by Dan Jacobson, Sep 19, 2003.

  1. Dan Jacobson

    Dan Jacobson Guest

    $ perldoc -q 'How can I comment out a large block of perl code?' says
    to use =begin comment text, =end comment text, but I find the =end
    comment text does not stop the comment, printing only "1":
    print 1;

    =begin comment text

    all of this stuff

    here will be ignored
    by everyone

    =end comment text

    print 2;

    Wait, he meant to say use a =cut instead of =end comment text!

    Please report a bug for me, my bugs just go into a black hole.
     
    Dan Jacobson, Sep 19, 2003
    #1
    1. Advertising

  2. Dan Jacobson

    Yury Kopyl Guest

    Dan Jacobson -> "How can I comment out a large block of perl code?" :

    DJ> $ perldoc -q 'How can I comment out a large block of perl code?'
    DJ> says to use =begin comment text, =end comment text, but I find the
    DJ> =end comment text does not stop the comment, printing only "1":
    DJ> print 1;

    DJ> =begin comment text

    DJ> all of this stuff

    DJ> here will be ignored by everyone

    DJ> =end comment text

    DJ> print 2;

    DJ> Wait, he meant to say use a =cut instead of =end comment text!

    I use next construction:

    =rem
    bla-bla-bla
    =cut

    Yury Kopyl aka hrg | http://id.totem.ru | [TEAM Nemiroff ?????]
     
    Yury Kopyl, Sep 19, 2003
    #2
    1. Advertising

  3. Dan Jacobson

    Dan Jacobson Guest

    $ perldoc perlpod|grep =rem
    $
    =rem is undocumented but works it seems.
     
    Dan Jacobson, Sep 20, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alec S.
    Replies:
    10
    Views:
    10,330
    Alec S.
    Apr 16, 2005
  2. Xah Lee
    Replies:
    3
    Views:
    576
    Jeff Shannon
    Jan 27, 2005
  3. Roseanne Zhang

    Can ruby comment out a block of code???

    Roseanne Zhang, Oct 14, 2006, in forum: Ruby
    Replies:
    5
    Views:
    172
    David Vallner
    Oct 15, 2006
  4. PerlFAQ Server
    Replies:
    0
    Views:
    125
    PerlFAQ Server
    Feb 3, 2011
  5. PerlFAQ Server
    Replies:
    0
    Views:
    206
    PerlFAQ Server
    Apr 16, 2011
Loading...

Share This Page