Perl comments are the same as shell script comments

Perl's comment is "#", which is the same as the comment "#" in shell scripts (sh, bash, csh, ksh, zsh).

Perl Comments

This is a Perl comment.

# Perl comments

Shell script comments

A comment from the shell script.

# Shell script comments

Comparison of Perl comments and shell script comments

Let's compare the comments in Perl with the comments in the shell script. Both are the same. Perl allows you to write comments in a Unix / Linux environment with the same syntax as a user writing a shell script would write a comment.

Perl refers to C language for grammar such as if statement and for statement, but for comments, you adopted the comments of the shell script.

Associated Information