FACTOID # 81: Two-thirds of the world's kidnappings occur in Colombia.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

SEARCH ALL

FACTS & STATISTICS    Advanced view

Search encyclopedia, statistics and forums:

 

 

(* = Graphable)

 

 


Encyclopedia > CGI.pm

CGI.pm is a large and widely used Perl module for programming Common Gateway Interface (CGI) web applications, providing a consistent API for receiving user input and producing HTML or XHTML output. A Perl module is a discrete component of software for the Perl programming language. ... Wikibooks has more about this subject: Computer programming Computer programming (often simply programming) is the craft of implementing one or more interrelated abstract algorithms using a particular programming language to produce a concrete computer program. ... Common Gateway Interface (CGI) is an important World Wide Web technology that enables a client web browser to request data from a program executed on the Web server. ... Spider Web Web can refer to: Spider web: A mesh built by a spider, composed of spider silk and usually used for catching prey. ... API with 3 clients, using the Unified Modeling Language notation An application programming interface (API) is a set of definitions of the ways one piece of computer software communicates with another. ... In computing, HyperText Markup Language (HTML) is a markup language designed for the creation of web pages and other information viewable in a browser. ... Extensible HyperText Markup Language, or XHTML, is a markup language that has the same expressive possibilities as HTML, but a stricter syntax. ...


The module is written and maintained by Lincoln D. Stein.


A Sample CGI Page

Here is a simple CGI page, written in Perl using CGI.pm (in object oriented style): In computer science, object-oriented programming, OOP for short, is a computer programming paradigm. ...

 #!/usr/bin/perl # use strict; use warnings; use CGI; my $q = CGI->new(); print $q->header('text/html'); print $q->start_html('A Simple CGI Page'), $q->h1('A Simple CGI Page'), $q->start_form, 'Name: ', $q->textfield('name'), $q->br, 'Age: ', $q->textfield('age'), $q->p, $q->submit('Submit!'), $q->end_form, $q->p, $q->hr; if ( $q->param('name') ) { print 'Your name is ', $q->param('name'), $q->br; } if ( $q->param('age') ) { print 'You are ', $q->param('age'), ' years old.'; } print $q->end_html; 

This would print a very simple webform, asking for your name and age, and after having been submitted, redisplaying the form with the name and age displayed below it. This sample makes use of CGI.pm's object-oriented abilities; it can also be done by calling functions directly, without the $q->.


External Links

  • Official homepage
  • CGI.pm – at the CPAN
Wikibooks
Wikibooks Programming has more about this subject:
Perl CGI


 
 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms, 1022, m