#!/usr/local/bin/perl # update_faq.pl # # Reads the text files of disciplinary questions and answers # (gen.qna bio.qna geo.qna phys.qna chem.qna) # and parses each question into a disciplinary table of questions, # as well as a separate disciplinary page that juxtaposes # the questions with their answers. # OPEN THE TOC BODY FILE open (TOC, ">toc.html") || die "Can't open TOC outfile\n"; # Read thru the input file, creating disciplinary outfiles and # feeding the questions into them, as well as a TOC. # Begin general section... print TOC "\n"; print TOC "

General Oceanography

\n\n
\n\n"; `cat genhead.html body.html tail.html > gen.html`; close(OUT); close(IN); #'rm body.html' # Begin atmo section... print TOC "\n"; print TOC "

Atmospheric questions

\n\n
\n\n"; `cat atmohead.html body.html tail.html > atmo.html`; close(OUT); close(IN); #'rm body.html' print TOC "\n"; print TOC "

Biological Oceanography

\n\n
\n\n"; `cat biohead.html body.html tail.html > bio.html`; close(OUT); close(IN); #'rm body.html' # Begin chem section... print TOC "\n"; print TOC "

Chemical Oceanography

\n\n
\n\n"; `cat chemhead.html body.html tail.html > chem.html`; close(OUT); close(IN); #'rm body.html' # Begin geo section... print TOC "\n"; print TOC "

Geological Oceanography

\n\n
\n\n"; `cat geohead.html body.html tail.html > geo.html`; close(OUT); close(IN); # Begin phys section... print TOC "\n"; print TOC "

Physical Oceanography

\n\n
\n\n"; `cat physhead.html body.html tail.html > phys.html`; close(OUT); close(IN); close(TOC); `cat head.html toc.html tail.html > faq.html`;