How to run perl script on ampps

From AMPPS Wiki
Jump to: navigation, search
  • To run Perl Scripts on AMPPS server, add Shebang line in the file and place it in cgi-bin directory.
  • Here is a example of Perl script to print Hello word:
  • Go to /path/to/Ampps/www/cgi-bin directory and create one file.
  • Add following Shebang line at the beginning of the file.

For Linux:




For Windows:


Note: In above line add actual path to Ampps directory instead of \path\to\Ampps.

  • Now print hello word.
print “Content-Type: text/html\n\n”;
print “Hello”;
  • Save it, restart Apache.
  • Now access your file on browser localhost/cgi-bin/