CGI in Perl

Hi,
Am unfamiliar with using CGI modules in Perl.
Though i checked in few sites about CGI , i dint get a clear idea.
Can anyone please explain me the purpose of these statements, it ll be very helpful to me

#!/usr/bin/perl
use CGI qw/:standard/;
use Storable;
use Data::Dumper;
my $variable = {};

$variable->{data}->{file} = retrieve("$variable->{sys}->{datadir}/file.storable.current");
{
statements....
}
  for my $sgroup (keys(%{$variable->{data}->{net}->{sgroups}})) 
{
statements
}

if ($globals->{data}->{net}->{sgroups}->{$sgroup}->{$servername}->{$serverport} eq $server) {
statements
}

 
%{$variables->{switches}} = map {
  my @values = para($_);
  $_ => $#values
    ? \@values
    : $values[0]
  } param();
for my $server (@{$servicegroups->{$servicegroup}}) 
{
statments
}

Thanks in advance

First, know CGI - a contract between a service executable and the web server. CGI must exit 0, must write part of the http response to stdout, gets Get form input in an environment variable encoded, other env variables tell about the socket, and POST input has to be read from stdin and decoded per the information in the environment. I think stderr goes into a log file. Input data can be in many different MIME formats. Output can be in almost any MIME format, e.g., text/html, text/plain, etc. You can write a CGI service in any language, but PERL scripting was an early leader.

PERL has modules to deal with CGI inputs and to help write output, but you must know HTTP and HTML to create valid and effective documents. And of course, you need to know about application specific challenges like creating PDF output if desired.