sub print_current { my $dbh = (@_); my $current =''; #same as undef ## Retrieve information from the database. my $sth_1 = $dbh->prepare ("SELECT count FROM counter;"); $sth_1->execute || die "$dbh->errstr()"; while (my $fields = $sth_1->fetchrow_arrayref()) { $current = $fields->[0]; } ## Display that information for the user. print "Content-type: text/html\n\n"; print "$current others have gathered information here.\n"; return ($current); }