Perlaccess : Tutorials : General
Documenting your Script (11.1)
by Brett Roberts
http://www.bigresources.com

While writing or modifying your scripts, be sure to write comments documenting what you are coding. This is essential in writing scripts as a web programmer because a lot of times other programmers will find your scripts and wish to learn why you coded a certain way.

To add comments on seperate lines...

1). At the beginning of a line, type # to start the comment
2). Type your comments following the #
3). Repeat the steps above for each line of code.

# This would be a comment line
# And another comment line

To add comments on the same line as code...

1). Type a line of code and don't forget the semicolon that ends a statement
2). After the end of the line, type a space and the #

3). After the #, begin typing your comment

$myvariable = "InitializeMe"; #This is where I initialize my variable $myvariable

Note: Each individual line of comments must begin with its own #