#!/usr/bin/perl
push(@INC,"/www/cgi-bin");
require 5.003;
require "cgi-lib.pl";

#-------------------------- What This Does ----------------------------
# Input data:  x,  y.
# Output: x + y
#---------------------------- Main Program ----------------------------
# The subroutine &ReadParse" (from the external utility program
# cgi-lib.pl) gets the data that was just submitted and makes it
# available to you.  For instance  $in{x}  has the value of x .
&ReadParse;

# The subroutine  "&PrintHeader"  (also from cgi-lib.pl)  is essential
# to print output to the voter's screen.
print &PrintHeader;

$z = $in{x} +  $in{y};

print <<"end";
<html><head><title>Math 210, Perl Example 1 1</title></head>

<body bgcolor="white">                                                          
<center><h2> Output for Example 1</h2>

<i>Your input</i>:  <b> x = $in{x}, y = $in{y}</b>

<p>
<i>Answer</i>: <b>x + y = $z</b>
</center>
</body></html>
end

