#!/usr/bin/perl -w use strict; use warnings; use CGI; use HTML::Template; my $operation = CGI::param('operation') || ''; my $eintragen = 'eintragen'; if ($operation  eq $eintragen ) {    eintragen(); } my $rhDict = {}; sub aktion1() { $rhDict->{reaktion} = "Ich habe Aktion 1 ausgefuehrt"; }#aktion1 sub aktion2() { $rhDict->{reaktion} = "Ich habe Aktion 2 ausgefuehrt"; }#aktion2 my $oCgi = new CGI; foreach ($oCgi->param) { $rhDict->{$_} = $oCgi->param($_); } while (my ($sKey, $sValue) = each (%ENV)) {$rhDict->{$sKey} = $sValue; } $rhDict->{aktion} = '' unless($rhDict->{aktion}); if ( $rhDict->{aktion} eq 'aktion1' ) { aktion1(); } elsif ( $rhDict->{aktion} eq 'aktion2' ) { aktion2(); } my @aLines = ; my $oTpl = HTML::Template->new( arrayref => \@aLines, die_on_bad_params => 0 ); while ( my($sKey, $vValue) = each(%{$rhDict}) ) { $oTpl->param($sKey => $vValue); } print "Content-Type:text/html\n\n" . $oTpl->output; exit(0); __END__