sub ShowLibLog { my $SQL = 'SELECT LibID, UID, ActionID, TXDate, Time, DocName, FromHost FROM LibrarianLog'; my @log = GetListFromDB($SQL); my $item; my @liblog; foreach $item (@log) { # GetListFromDB will store the results of the sql statement in an array of hash # references. Our first step is to create an array of hashes to be passed to # HTML::Template for display based on the results of the SQL statement. *PHEW* my %entry = (LibID=>%$item->{'LibID'}, UID=>GetItemFromDB('RealName','UID', %$item->{'UID'},'User'), ActionID=>GetItemFromDB('ActionName','ActionID', %$item->{'ActionID'},'Action'), TXDate=>%$item->{'TXDate'}, Time=>%$item->{'Time'}, DocName=>%$item->{'DocName'}, FromHost=>%$item->{'FromHost'}); push (@liblog, \%entry); } $viewliblog_page->param(liblog=>\@liblog); #This is the line giving me angst!!! print "Content-type: text/html\n\n", $viewliblog_page->output; }