Note, that just like all the other form elements, the value of a hidden field is "sticky". If you want to replace a hidden field with some other values after the script has been called once you'll have to do it manually: $query->param('hidden_name','new','values','here'); #### sub bar { my $self = shift ; my $q = $self->query() ; my $output = '' ; my $first_number = $q->param( 'first_number' ) ; $q->param( 'runmode', 'mode3' ); $output .= $q->start_html( "Bar" ) ; $output .= $q->h2( 'I\'m webapp run mode number two.' ) ; $output .= $q->h2( 'You click me and I\'ll click you!' ) ; $output .= $q->start_form ; $output .= $q->h3( 'Gimme another number!' ) ; $output .= $q->textfield( -name => 'second_number' ); $output .= $q->hidden( -name => 'first_number', -value => $first_number ); $output .= $q->hidden( -name => 'runmode', -value => 'mode3' ); $output .= $q->submit(); $output .= $q->end_form(); $output .= $q->end_html(); return $output; }