- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Comments in Perl
Comments in any programming language are friends of developers. Comments can be used to make program user-friendly and they are simply skipped by the interpreter without impacting the core functionality. For example, in the above program, a line starting with hash # is a comment.
Simply saying comments in Perl start with a hash symbol and run to the end of the line −
# This is a comment in perl
Lines starting with = are interpreted as the start of a section of embedded documentation (pod), and all subsequent lines until the next =cut are ignored by the compiler. Following is the example −
Example
#!/usr/bin/perl # This is a single line comment print "Hello, world\n"; =begin comment This is all part of multiline comment. You can use as many lines as you like These comments will be ignored by the compiler until the next =cut is encountered. =cut
Output
This will produce the following result −
Hello, world
- Related Articles
- Comments in Python
- Comments in C#
- Explain Comments in JavaScript
- /** and /* in Java comments
- Comments in Java\n
- Executable Comments in Java
- Comments in C/C++
- Comments in Dart Programming
- Comments in Rust Programming
- Comments in Lua Programming
- Java comments.
- HTML Comments
- CSS Comments
- What are Comments in JavaScript?
- Comments in C++ Programming Language

Advertisements