Pin Me

Perl CGI and Web Programming

written by: Finn Orfano • edited by: Leigh A. Zaykoski • updated: 6/19/2008

This article discusses the use of Perl CGI in web programming. Specifically, how CGI as a connection between programs and servers, is used to create web pages, and how Perl CGI is used in bioinformatics.

  • slide 1 of 1

    Before learning Perl CGI and web programming in bioinformatics, let us learn about the basics of CGI. CGI is commonly known as Common Gateway Interface. It is a method used by web servers to run external programs to generate web content dynamically.

    CGI is simply a specification which defines a standard way for web servers to run CGI scripts. Perl is a very popular language for CGI scripting, due to its text handling ability, easy scripting, and relative speed. Setting up CGI in Unix/Linux requires a web server called Apache server. In order to set up CGI on Windows, one should install the Internet Information Server.

    Basic CGI scripts, in either Perl or any other programming language, use two types of texts: plain text, and HTML text. As Perl is a natural language it can be embedded in other programming languages as well as using it to embed with web programming.


    CGI is the main program to use when you are going to create web pages. One can use the text editor of that operating system for constructing CGI scripts. This CGI program is a program called by the web server, in response to some action by the user. Perl offers a very powerful feature of adding a module known as, which is used to run CGI programs. This module is a collection of a pre-written code.

    CGI can be sometimes defined as the mechanism that connects between computer programs and the web server. It allows you to provide a web interface to your program from a web browser, and to get the output in a results page.

    In bioinformatics, it is used to create different kinds of online tools. One such online tool is ORF Finder, which finds the ORFs present in a given query sequence. CGI programming may also be used to perform a database search online.

    Interested in learning more about Perl? Read these articles:

    Using Perl for Bioinformatics

    The Use of Regular Expression In Perl