############################################################ # # This is the "meat" of the program where all the # database stuff is hidden. Everything up to here # is the Tk interface. # ############################################################ #### sub get_subject_list { my @list; my $topic; my $dbh = DBI->connect("DBI:CSV:"); my $sth = $dbh->prepare("SELECT subject FROM subjects"); $sth->execute(); while( $topic = $sth->fetchrow_array ) { push(@list,$topic); } return @list; $dbh->disconnect(); }