How to put a Comment in Perl?

This Comment will be submitted for moderation and will not be accessible to other users until it has been approved.


Perl code can be commented using # as follows:

#!/usr/bin/perl ######################## # I donot execute. This is comment. ######################## perl "Hello World";

Note, in perl first line carries special significance to the perl program. It always begins with #!, followed by the path to the perl binary/executable. It shows where perl executable is to be found. Perl is an interpreted language and does not compile. Therefore, do not think that first line is a comment, since, it is starting with #.





Post Comment

  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. Beside the tag style "<foo>" it is also possible to use "[foo]". PHP source code can also be enclosed in <?php ... ?> or <% ... %>.