CSCI 4230
 Software Tools
 Spring 2000
 Homework #4

Due Date: February 21, 2000

(1)    Write a Perl program, h4parse.pl, to extract from a html file, h4glossary.htm, all mortgage terms and their definitions.  Study the format carefully so your program should work probably.  Change HTML special characters in the file to regular txt regulars.  Store the term as the key and the definition as the value of a Perl User Database, h4dbm.  Note that the htm file is obtained from http://www.pamort.com/pamco/glossary.htm.  Simplification has been applied to ease your job.  Note that it is copyrighted so you should only use it as a homework.

(2)    Write another Perl program h4search.pl to search for one keyword that appears in either the key or the value of the user database h4dbm created in (1).  Here is a section of executing the program.

Please input a keyword=>adjustable-rate
[1]Caps (interest):  Consumer safeguards on an adjustable-rate mortgage/deed of trust which limit the amount the interest may change per yea
r and/or over the life of the loan.
[2]Caps (payment): Consumer safeguards on an adjustable-rate mortgage/deed of trust which limit the amount the monthly payments may change.
[3]Convertible Mortgage: A type of adjustable-rate mortgage that may be converted to a fixed-rate mortgage at specified intervals during a p
redetermined time period. In income property lending, a mortgage in which lender-provided funds to convert to equity ownership after a prede
termined period of time.
[4]Full Amortized ARM: An adjustable-rate mortgage that has a monthly payment sufficient to amortize the unpaid principal balance - at the i
nterest accrual rate - over the mortgage term.
[5]Two-Step Mortgage: An adjustable-rate mortgage that has one interest rate for the first five or seven years of its mortgage term and a di
fferent interest rate for the remainder of the mortgage term.
[6]Yield Differential Adjustment: An amount paid to the servicer of a whole first mortgage when the initial interest rate of a mortgage exce
eds the required yield for the commitment under which the mortgage was purchased. For adjustable-rate mortgages, a yield differential adjust
ment occurs if there is excess "margin" rather than yield.