ceilingcat has asked for the wisdom of the Perl Monks concerning the following question:
I am quite a novice with regard to perl and I am trying to get some code working.
The two links above contain code for a trivia bot to run on IRC. The questions and answers for the bot are supposed
to be stored in a database, but there is no explanation of what the structure of the database should be.
So far I have created a database named "trivia" and two tables, one called "trivia" with two fields "question" & "answer",
and the other table is called "scores" with fields named "nick" and "score".
sub get_score { my $obj = shift; return $obj->{dbh}->selectall_hashref("SELECT * FROM scores") ; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Reverse engineering some code :(
by ysth (Canon) on Jun 21, 2009 at 06:39 UTC | |
|
Re: Reverse engineering some code :(
by ceilingcat (Initiate) on Jun 21, 2009 at 06:32 UTC |