#!/usr/local/bin/perl5 -w
#  Simple Quoted String Example
#
require "cgi-lib.pl"; # Public Domain library to read form data
#
$statusofread =  &ReadParse(*formdata); # read data in associate array formdata
#
$one ="1"; # if no good form data!
$two = "A firm 2"; # Can't be Changed
$inputline='$one is interpolated'; # if no good form data!
if( $statusofread )     { # If $statusofread nonzero, data read OK
        $one = $formdata{"one"}; # The input $one
	$inputline = $formdata{"line"}; # Line to interpolate in
	$one =~ s/[;%]//g; # Remove dangerous characters
	$inputline =~ s/[;%]//g; 
}
#
$today =`date`;
chomp($today); # Today's date captured from UNIX
#
print <<EOF; # Start the HTML responding page beginning with HTTP line
Content-Type: text/html

<html>
<head>
<title>This is Result of my Quoted String CGI Script </title>
</head>
<body bgcolor="white" >
EOF
$fred= eval "qq($inputline)";
print <<EOF; # End HTML Page
<h2>$fred</h2>
</body>
</html>
EOF
exit; # End Program
