Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3211010
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T14:39:21+00:00 2026-05-17T14:39:21+00:00

Possible Duplicate: What are the common workarounds for multi-line comments in Perl? How do

  • 0

Possible Duplicate:
What are the common workarounds for multi-line comments in Perl?

How do I add a multi-line comment to Perl source code?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T14:39:22+00:00Added an answer on May 17, 2026 at 2:39 pm

    POD is the official way to do multi line comments in Perl. See:

    • Multi-line comments in perl
      code
      and
    • Better ways to make multi-line comments in Perl for more
      detail.
    • How can I comment out a large block of Perl code?

    The quick-and-dirty way to comment out more than one line of Perl is
    to surround those lines with Pod directives. You have to put these
    directives at the beginning of the line and somewhere where Perl
    expects a new statement (so not in the middle of statements like the #
    comments). You end the comment with =cut, ending the Pod section:

    =pod
    
    my $object = NotGonnaHappen->new();
    
    ignored_sub();
    
    $wont_be_assigned = 37;
    
    =cut
    

    The quick-and-dirty method only works well when you don’t plan to
    leave the commented code in the source. If a Pod parser comes along,
    your multiline comment is going to show up in the Pod translation. A
    better way hides it from Pod parsers as well.

    The =begin directive can mark a section for a particular purpose. If
    the Pod parser doesn’t want to handle it, it just ignores it. Label
    the comments with comment. End the comment using =end with the
    same label. You still need the =cut to go back to Perl code from the
    Pod comment:

    =begin comment
    
    my $object = NotGonnaHappen->new();
    
    ignored_sub();
    
    $wont_be_assigned = 37;
    
    =end comment
    
    =cut
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: What are common concurrency pitfalls? I have basic knowledge of threading, nothing
Possible Duplicate: TSQL query to concatenate and remove common prefix Hi How does one
Possible Duplicate: Why does ASP.NET auto-generated .designer code have the incorrect type? On my
Possible Duplicate: Why an executable program for a specific CPU does not work on
Possible Duplicate: Ruby: difference between || and ‘or’ Using Ruby || and or are
Possible Duplicate: Allen Holub wrote “You should never use get/set functions”, is he correct?
Possible Duplicate: What does a type followed by _t (underscore-t) represent? While typing in
Possible Duplicate: Why C# implements methods as non-virtual by default? It would be much
Possible Duplicate: Should I use uint in C# for values that can’t be negative?
Possible Duplicate: Python Ternary Operator If Python would support the (x ? a :

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.