http://www.perlmonks.org?node_id=829957


in reply to Program Comments

Don't include comments (like #prints the initial value of $count before the while loop started at line 76) that refer to specific line numbers. Your program will change, and line numbers will almost certainly change. If it's important to keep track of a specific line, I suggest you use a label and refer to that.

Before worrying about comments, though, I'd improve the formatting of the code...