HTML, JavaScript, and SSI all have comment tags. PERL follows the trend and also allows you to enter comment areas. This is great considering some scripts can become rather indepth. Having a couple comment lines greatly helps during editing and documenting.
To comment a line out in PERL, the # symbol is used.
The reason behind using comments is usually to help in future editing. It's best to enter in descriptive comments rather than general unclear ones.
Good :
Bad :
Get the idea?
To comment a line out in PERL, the # symbol is used.
|
# This line is commented out. # We can describe what the next part of the script does. # And so forth and so on. |
The reason behind using comments is usually to help in future editing. It's best to enter in descriptive comments rather than general unclear ones.
Good :
|
# calculate a cost-of-living adjustement and # raise the emplyee's salrary by that amount: $salary += $salary * $col_percentage; |
Bad :
|
# Increment salary by salary times col_percentage: $salary += $salary * $col_percentage; |
Get the idea?


