Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
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.<br +>" ), $q->p( $DBASE{ $q->param( 'poll' ) } ), $q->p( "You voted for: " . $q->param( 'poll' ) . "<br>" ), $q->table( map{ $q->Tr( $q->td( $_ . " -> " . $DBASE{$_} ) ) } sor +t keys %DBASE ), $q->hr, $q->a( {-href => $q->referer }, "Back" ); $q->end_html; dbmclose( %DBASE ); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBM Value++ In CGI
by cbro (Pilgrim) on May 13, 2003 at 13:07 UTC | |
|
Re: DBM Value++ In CGI
by cbro (Pilgrim) on May 13, 2003 at 13:18 UTC | |
|
Re: DBM Value++ In CGI
by Anonymous Monk on May 13, 2003 at 12:10 UTC |