Please note, this is a STATIC archive of website www.htmlgoodies.com from 16 Nov 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.
Click Here!
Click Here!

Perl Primer Nine Assignment
A Possible Answer

     First off, we'll need some new HTML to gather a number of feet. Let's use another text box. It should look something like this:

<INPUT TYPE="TEXT" SIZE="10" NAME="feet">

     Next up we'll need to use that value to figure the result. First we need to convert the feet to inches and then convert the inches to centimeters. I think we can do that all on one math line. How about this:

print "You entered $FORM{feet} feet. That would be ";
print ($FORM{feet}/12) / 2.2;
print " centimeters.";



Close this window to return to the Primer