use CGI; my $cgi = CGI->new(); my %params = $cgi->Vars(); if($params{neu}){ print $cgi->redirect(-url => '/index.html'); } else{ print $cgi->header(-type => 'text/html'); do_the_rest(); } exit; sub do_the_rest{ print $cgi->start_form(), $cgi->submit(-name => "neu", -value => "Neu"), $cgi->end_form(); }