your webserver will have an assigned folder from where it knows it's contents are cgi files. It is here that you place and call your code. Default and common used name is /cgi-bin/ . When you call a script from www.yoursite.com/cgi-bin/script.cgi , your server will load the interpreter and execute the code. Your server may also be instructed to run only files with a certain extension, so a .pl file may need to be renamed .cgi .
Note that the first line in your Perl file describes the interpreter location.