You'll also need to check permissions on the .cgi script, and you may have to set the web server up to allow cgi script execution.
Finally, make sure you have the Perl location in the head of the script so that the script engine knows what it's running. (#!/perl/ or something similar, depending on your system. You can find specific references for most Linux and Windows installations online)
Z.