These scripts must have 755 permissions.
Perl = .pl
Python = .py
Example perl script:
#!/usr/bin/perl -w
print "Content-type: text/html\n\n";
print "<html><head>";
print "<title>CGI Test</title>";
print "</head><body>";
print "<p>Test page using Perl</p>";
print "</body></html>";