You seem to be under a missaprehension. Perl, as a cgi, is only invoked when the browser makes a request to a server and that server determines that request to be handled by a cgi script. The only way a perl script will be run is if you configure the server to execute it in response to some query.