in reply to Prompted to Open or Save CGI Program -- configuration issue?

Debugging CGI programs
When writing CGI programs, there are many problems which may affect their execution. Since these will not always be easily understood by examining the web browser output, there are other ways to determine whatÂ’s going wrong.

If there seems to be a problem first try the following steps:
1. Check that your program compiles by using perl -c
2. Check the permissions on your cgi program. If it is not world executable then it won’t work.
3. Run your program on the command line. If your program waits for input, that’s your opportunity to pass in parameters. For the moment, press CTRL-d.
4. If your program runs fine on the command line but still does not output to the browser, make sure that you have not forgotten to print the header before any other output.
5. Check the HTML source that you’re printing. Make sure that you’ve closed any tables you’ve opened and not made any obvious HTML errors.
6. Check the web server’s log files. The location of these vary from system to system. On our system they’re in /var/log/apache/.

the above text is from http://perltraining.com.au/courses/webdev.html

my apache setting is like this in /etc/apache2/httpd.conf and my apache ( Server version: Apache/2.2.3) is able to run cgi scripts properly which is located in /var/www/cgi-bin/

<VirtualHost *> ScriptAlias /cgi-bin/ /var/www/cgi-bin/ <Directory "/var/www/cgi-bin"> Options ExecCGI SetHandler cgi-script </Directory> </VirtualHost>
I found Troubleshooting Perl CGI scripts also helpful.

Vivek
-- In accordance with the prarabdha of each, the One whose function it is to ordain makes each to act. What will not happen will never happen, whatever effort one may put forth. And what will happen will not fail to happen, however much one may seek to prevent it. This is certain. The part of wisdom therefore is to stay quiet.