Anyone know/understand CGI scripts?

My school only allows cgi scripts, and they must be .cgi files exclusively. There is also a specific public_cgi folder exclusivley for scripts.

Im trying to make a simple mailer to my email. What language should I be reading up on to right this thing? I can make a form in DW easy, im just not sure how to make it interact with a cgi script.

It seems websites when talking about cgi are talking about .pl or perl. Should i write it in perl and give it the file name .cgi?

Any help, thanx in advance, Im a complete newb to serverside scripting!!!