sub DisplayPollResults { my $poll_results_dbase = POLL_DATA_LOCATION . "/polldbase.db"; dbmopen( my %DBASE, $poll_results_dbase, 0644 ) || print "Error opening $poll_results_dbase: $!"; ++$DBASE{ $q->param( 'poll' ) }; print $q->header( 'text/html' ), $q->start_html( -title => 'Poll Results', -style => {'src' => '/styles/style.css'} ), $q->hr, $q->p( "Hello " . $q->remote_host() . "! Thanks for your vote.
" ), $q->p( $DBASE{ $q->param( 'poll' ) } ), $q->p( "You voted for: " . $q->param( 'poll' ) . "
" ), $q->table( map{ $q->Tr( $q->td( $_ . " -> " . $DBASE{$_} ) ) } sort keys %DBASE ), $q->hr, $q->a( {-href => $q->referer }, "Back" ); $q->end_html; dbmclose( %DBASE ); }