#!C:/Perl/bin/perl.exe -w use strict; use CGI; use Data::Dumper; my $cgi = new CGI; my @cgi_vars = $cgi->param(); if ($#cgi_vars < 0) { # handle the case of no CGI parameters # ... exit(0); } # build a (normalized) hash of CGI variables # with variable name converted to upper case my %vars = map { uc($_) => $cgi->param($_) } @cgi_vars; # debug only - display the variable hash #print Dumper(\%vars); # Handle the requests if (defined $vars{DELIVERMESSAGE}) { # do deliver message # ... } elsif (defined $vars{MESSAGECOUNT} && defined $vars{BRANCH}) { # do message count # $vars{BRANCH} is the branch name # ... } elsif (defined ..... ) { # etc. etc. }