Open a Terminal window and do the following:
1. type:
cd /Library/WebServer/CGI-Executables/
2. type:
vim hello.pl
3. press i to enter insert mode
4. type:
#!/usr/bin/perl
5. type:
print"Content-type:text/html\n\n";
6. type:
print "Hello Cleveland! \n";
7. press `esc` to exit insert mode
8. type
:wq to write & quit
9. type:
chmod 755 hello.pl
10. go to
http://localhost/cgi-bin/hello.pl
If you don't get a 500 error, you'll see "Hello Cleveland!" and you'll be on your way to ruling the universe. If you do, then you need to configure your httpd.conf.
Oh, you don't "install CGI". You should probably do some homework as to what CGI stands for and how the basic process I talked you through actually works. Line #4 should give you a clue.