in reply to Cgi script with no output to webpage?

Unless you're doing it for a learning exercise or just for fun, don't. It adds overhead to your server and it's harder to get the reporting right than you might think. Google Analytics is free and terrific.

Then if you really want to do it yoursef, you should be able to do something like this-

use strict; use warnings; use CGI (); use HTML::Entities (); eval { # Do counting stuff and make sure it's not failing # and won't matter if it does. }; my $output = $@ ? CGI::h3(HTML::Entities::encode_entities("I haz errerz: $@")) : "<!-- I haz a count -->"; print CGI::header(), CGI::start_html(), $output, CGI::end_html();