To execute programs in Windows, follow these steps :-
- First install and perform the tasks as provided in this link. http://srikanthgundaz.wordpress.com/2010/11/11/execute-php-and-mysql-programs-in-windows/
- Then browse to folder C:\xampp\xampp\cgi-bin and paste/write your .cgi or .pl scripts :)
- Generally, you run perl programs is executed in Linux Platform and since we are writing and executing perl program in Windows, we have to change shebang line i.e #!/usr/bin/perl
- To do above task, delete/replace the line #!/usr/bin/perl by #!"C:\xampp\xampp\perl\bin\perl.exe" (This is as per my installation directory). If you find it difficult, then do not worry, open printenv.pl file where you can find cgi-bin directory and copy the first line of printenv.pl file and replace shebang line of your perl script.
- Now open browser and type http://localhost/cgi-bin/program_name.cgi or http://localhost/cgi-bin/program_name.pl
Thank you for reading this post. Please do comments if you like this post. Any queries about this post is whole heartedly welcomed :) :)