#!/usr/bin/perl print "Content-type: text/html\n\n"; print <<"HTML"; Riverweb Notebook data HTML print "

Questions

\n"; use DB_File; $dbmfile = 'riverweb.dbm'; tie %hash, DB_File, $dbmfile; # open database, to be accessed # prints all elements of hash while (($key, $val) = each %hash){ ($parsedinfo[0], $parsedinfo[1], $parsedinfo[2], $parsedinfo[3], $keywords, $parsedinfo[4]) = split(/\|/, $val); #print "parseDatabaseString vars: $parsedinfo[0], $parsedinfo[1], $parsedinfo[2], #$parsedinfo[3], $keywords, $parsedinfo[3]
\n"; # put keywords in their own array @parsedstring = split(/:/, $keywords); if ($parsedinfo[1] eq '1'){ print "

\n"; print "$parsedinfo[0]
\n"; print "$parsedinfo[1]
\n"; print "$parsedinfo[2]
\n"; print "$parsedinfo[3]
\n"; print "$parsedinfo[4]
\n"; print "$keywords
\n"; } } print "

Responses

\n"; while (($key, $val) = each %hash){ ($parsedinfo[0], $parsedinfo[1], $parsedinfo[2], $parsedinfo[3], $keywords, $parsedinfo[4]) = split(/\|/, $val); #print "parseDatabaseString vars: $parsedinfo[0], $parsedinfo[1], $parsedinfo[2], #$parsedinfo[3], $keywords, $parsedinfo[3]
\n"; # put keywords in their own array @parsedstring = split(/:/, $keywords); if ($parsedinfo[1] eq '3'){ print "

\n"; print "$parsedinfo[0]
\n"; print "$parsedinfo[1]
\n"; print "$parsedinfo[2]
\n"; print "$parsedinfo[3]
\n"; print "$parsedinfo[4]
\n"; print "$keywords
\n"; } } untie %hash; # close database while (($key, $val) = each %hash){ ($parsedinfo[0], $parsedinfo[1], $parsedinfo[2], $parsedinfo[3], $keywords, $parsedinfo[4]) = split(/\|/, $val); #print "parseDatabaseString vars: $parsedinfo[0], $parsedinfo[1], $parsedinfo[2], #$parsedinfo[3], $keywords, $parsedinfo[3]
\n"; # put keywords in their own array @parsedstring = split(/:/, $keywords); if ($parsedinfo[1] eq '2'){ print "

\n"; print "$parsedinfo[0]
\n"; print "$parsedinfo[1]
\n"; print "$parsedinfo[2]
\n"; print "$parsedinfo[3]
\n"; print "$parsedinfo[4]
\n"; print "$keywords
\n"; } } untie %hash; # close database while (($key, $val) = each %hash){ ($parsedinfo[0], $parsedinfo[1], $parsedinfo[2], $parsedinfo[3], $keywords, $parsedinfo[4]) = split(/\|/, $val); #print "parseDatabaseString vars: $parsedinfo[0], $parsedinfo[1], $parsedinfo[2], #$parsedinfo[3], $keywords, $parsedinfo[3]
\n"; # put keywords in their own array @parsedstring = split(/:/, $keywords); if ($parsedinfo[1] eq '4'){ print "

\n"; print "$parsedinfo[0]
\n"; print "$parsedinfo[1]
\n"; print "$parsedinfo[2]
\n"; print "$parsedinfo[3]
\n"; print "$parsedinfo[4]
\n"; print "$keywords
\n"; } } untie %hash; # close database print <<"HTML"; HTML