#!/usr/bin/perl # Author name: Sandi Barger # Creation date: 11/14/02 # catalog.cgi - creates a dynamic Web page that # lists the contents of catalog.txt print "Content-type: text/html\n\n"; use CGI ':standard'; #Product Item Number|Product Name|Author|Product Price|Publisher & comments|Type|ISBN|Pages|pic URL|Product Description #declare variables my ($prodnum, $prodname, $author, $price, $publisher, $type, $isbn, $pages, $pic, $proddesc, $supplier, $suppemail); my @records; #read the contents of catalog.txt open (INFILE, "; close(INFILE); #create Web page print "Marguerite deAngeli books in print\n"; print "\n"; print "
Friends logo
Return to home page\n"; print "View catalog\n"; print "Membership informationAbout the Friends

deAngeli books in print
Ask at your bookstore or online at Herald Press:

\n"; print "\n"; foreach my $rec (@records) { chomp ($rec); ($prodnum, $prodname, $author, $price, $publisher, $type, $isbn, $pages, $pic, $proddesc, $supplier, $suppemail) = split(/~/, $rec); print "\n"; print "\n"; } print "

$prodname

$prodname
Author: $author
Publisher: $publisher

Item Number: $prodnum
Type: $type
Pages: $pages
ISBN: $isbn

Description:

$proddesc

Lapeer District Library

Web Master: Sandra Barger
©CopyRight 2005Sandra Barger
Last Updated:

Link to lapeer.org
\n"; print "\n";