You need to put your Perl scripts in the cgi-bin of the apache2 webserver. Google for "
" and you will get all the answers you need. There is an apache configuration file, which specifies where the cgi-bin is, and what file extensions like .pl are recognized. Although it is possible to set it up so that cgi scripts can be run from the html root directory, it is very seldom done for security reasons. You can load an image or html page from html-root, but scripts are generally confined to a cgi-bin directory.