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

  • SEARCH
  • Home
  • 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: Are do-while-false loops common? Is there a reason to have code like:
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: Common Uses For Pointers? I am still learning the basics of C++
Possible Duplicate: Is Clojure closer to Scheme or Common Lisp from a beginner's perspective?
Possible Duplicate: What C++ pitfalls should I avoid ? What is the most common
Possible Duplicate: Why not use tables for layout in HTML? Under what conditions should
Possible Duplicate: NAnt or MSBuild, which one to choose and when? What is the
Possible Duplicate: How do I calculate someone's age in C#? Maybe this could be

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.