in reply to Understanding ::
If you really mean that when you put all the counter code at the end of the script, then it may be because $hits is undefined when used in the print statement.
In general it is strongly recommended that you put:
use strict; use warnings;
at the start of your script. (The -w does much the same as use warnings;.)
|
|---|