Cgi-bin with Perl and Python

I haven’t used a cgi-bin in years (thanks to php), so I thought I’d give it a shot. I created 2 test files, one in perl and one in python. Here’s what they look like:

#!/usr/bin/perl
print “Content-type:text/html\n\n”;
print “Hello World”;

and

#! /usr/bin/python
print “Content-type: text/html\n\n”
print “Hello World”

Then it’s as simple as dropping them in the cgi-bin, doing a chmod 755 on the files, and load ’em up in a web browser.

Leave a Reply