The majority of scripts that you will find on the web are written in the Perl language. Perl is relatively simple to learn, especially since many useful routines already exist for dealing with web forms and other CGI issues. If you are planning to use CGI extensively you should consider learning Perl. More on this later. This makes your life easier since you can put your script anywhere you like.
Some people create a subdirectory specifically to hold their CGIs.
This directory is traditionally called cgi-bin . The documentation should tell you what, if anything, needs to be modified in the program. In addition, some scripts need you to specify where the script is being kept, and at what web address it can be located. Make sure you know which one your script needs. This line tells the system where the Perl is located and is very important.